Added @typescript-eslint/explicit-member-accessibility rule

plugin_system_types_test
Laurent Cozic 2020-10-03 15:45:32 +01:00
parent 85df133386
commit 1a5cead659
1 changed files with 12 additions and 0 deletions

View File

@ -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'],
},
},
],
};