-
Notifications
You must be signed in to change notification settings - Fork 37
/
eslint.common-rules.mjs
39 lines (39 loc) · 1.36 KB
/
eslint.common-rules.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
export const commonRules = {
rules: {
// @stylistic
'@stylistic/no-multiple-empty-lines': ['error', { max: 2, maxBOF: 0, maxEOF: 0 }],
'@stylistic/operator-linebreak': ['error', 'after'],
'@stylistic/padded-blocks': 'off',
'@stylistic/no-trailing-spaces': 'off',
'@stylistic/comma-dangle': 'off',
'@stylistic/spaced-comment': 'off',
'@stylistic/indent-binary-ops': 'off',
'@stylistic/arrow-parens': 'off',
'@stylistic/max-statements-per-line': ['error', { max: 2 }],
'@stylistic/dot-location': ['error', 'object'],
'@stylistic/eol-last': ['error', 'always'],
// Possible Problems
'array-callback-return': 'error',
'no-constructor-return': 'error',
'no-duplicate-imports': 'error',
'no-inner-declarations': 'error',
'no-promise-executor-return': 'error',
'no-self-compare': 'error',
'no-template-curly-in-string': 'error',
'no-unmodified-loop-condition': 'error',
'no-unreachable-loop': 'error',
'no-use-before-define': 'error',
'require-atomic-updates': 'error',
// Suggestions
'accessor-pairs': 'error',
'block-scoped-var': 'error',
'consistent-return': 'error',
'class-methods-use-this': 'error',
'consistent-this': 'error',
'dot-notation': 'error',
'eqeqeq': 'error',
'no-var': 'error',
'object-shorthand': 'error',
'require-await': 'error'
}
};