mirror of https://github.com/laurent22/joplin.git
Added @typescript-eslint/explicit-member-accessibility rule
parent
85df133386
commit
1a5cead659
12
.eslintrc.js
12
.eslintrc.js
|
@ -50,6 +50,7 @@ module.exports = {
|
|||
'react/jsx-uses-vars': 'error',
|
||||
'no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }],
|
||||
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }],
|
||||
'@typescript-eslint/explicit-member-accessibility': 'off',
|
||||
'no-constant-condition': 0,
|
||||
'no-prototype-builtins': 0,
|
||||
// This error is always a false positive so far since it detects
|
||||
|
@ -121,4 +122,15 @@ module.exports = {
|
|||
'react-hooks',
|
||||
'import',
|
||||
],
|
||||
'overrides': [
|
||||
{
|
||||
// enable the rule specifically for TypeScript files
|
||||
'files': ['*.ts', '*.tsx'],
|
||||
'rules': {
|
||||
// Warn only because it would make it difficult to convert JS classes to TypeScript, unless we
|
||||
// make everything public which is not great. New code however should specify member accessibility.
|
||||
'@typescript-eslint/explicit-member-accessibility': ['warn'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue