@perfective/eslint-config
Version:
ESLint shareable rules configuration
96 lines • 2.81 kB
JavaScript
export const eslintPossibleProblemsRules = {
'array-callback-return': ['error', {
allowImplicit: true,
checkForEach: false,
allowVoid: false
}],
'constructor-super': 'error',
'for-direction': 'error',
'getter-return': 'error',
'no-async-promise-executor': 'error',
'no-await-in-loop': 'error',
'no-class-assign': 'error',
'no-compare-neg-zero': 'error',
'no-cond-assign': ['error', 'always'],
'no-const-assign': 'error',
'no-constant-binary-expression': 'error',
'no-constant-condition': 'error',
'no-constructor-return': 'error',
'no-control-regex': 'error',
'no-debugger': 'error',
'no-dupe-args': 'error',
'no-dupe-class-members': 'error',
'no-dupe-else-if': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-duplicate-imports': ['off', {
includeExports: true
}],
'no-empty-character-class': 'error',
'no-empty-pattern': 'error',
'no-ex-assign': 'error',
'no-fallthrough': ['error', {
allowEmptyCase: false,
reportUnusedFallthroughComment: true
}],
'no-func-assign': 'error',
'no-import-assign': 'error',
'no-inner-declarations': 'error',
'no-invalid-regexp': 'error',
'no-irregular-whitespace': ['error', {
skipStrings: false,
skipComments: false,
skipRegExps: false,
skipTemplates: false,
skipJSXText: false
}],
'no-loss-of-precision': 'error',
'no-misleading-character-class': ['error', {
allowEscape: false
}],
'no-new-native-nonconstructor': 'error',
'no-new-symbol': 'error',
'no-obj-calls': 'error',
'no-promise-executor-return': 'error',
'no-prototype-builtins': 'error',
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-setter-return': 'error',
'no-sparse-arrays': 'error',
'no-template-curly-in-string': 'error',
'no-this-before-super': 'error',
'no-undef': 'off',
'no-unexpected-multiline': 'error',
'no-unmodified-loop-condition': 'error',
'no-unreachable': 'error',
'no-unreachable-loop': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-unsafe-optional-chaining': 'error',
'no-unused-private-class-members': 'error',
'no-unused-vars': ['error', {
args: 'after-used',
argsIgnorePattern: '^_',
caughtErrors: 'all',
destructuredArrayIgnorePattern: '^_',
ignoreClassWithStaticInitBlock: false,
ignoreRestSiblings: false,
reportUsedIgnorePattern: false,
vars: 'all'
}],
'no-use-before-define': ['error', {
functions: false,
classes: false,
variables: false,
allowNamedExports: false
}],
'no-useless-backreference': 'error',
'no-useless-assignment': 'error',
'require-atomic-updates': ['error', {
allowProperties: false
}],
'use-isnan': 'error',
'valid-typeof': ['error', {
requireStringLiterals: true
}]
};