-
Notifications
You must be signed in to change notification settings - Fork 79
/
eslint.config.js
49 lines (46 loc) · 1.77 KB
/
eslint.config.js
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
40
41
42
43
44
45
46
47
48
import stylisticJs from '@stylistic/eslint-plugin-js';
export default [
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
plugins: {
'@stylistic/js': stylisticJs
},
rules: {
camelcase: 'off',
'prefer-const': 'warn',
eqeqeq: 'warn',
curly: ['warn', 'multi-or-nest'],
'one-var': ['warn', 'consecutive'],
'no-new-func': 'off',
// moved to @stylistic/js
'@stylistic/js/semi': 'warn',
'@stylistic/js/quotes': ['warn', 'single'],
'@stylistic/js/indent': 'off',
'@stylistic/js/array-bracket-spacing': 'warn',
'@stylistic/js/comma-spacing': 'warn',
'@stylistic/js/keyword-spacing': 'warn',
'@stylistic/js/semi-spacing': 'warn',
'@stylistic/js/no-floating-decimal': 'warn',
'@stylistic/js/no-multi-spaces': ['warn', { ignoreEOLComments: true }],
'@stylistic/js/no-multiple-empty-lines': ['warn', { max: 2, maxEOF: 0 }],
'@stylistic/js/object-curly-spacing': ['warn', 'always'],
'@stylistic/js/space-in-parens': 'warn',
'@stylistic/js/key-spacing': 'warn',
'@stylistic/js/object-property-newline': 'off',
'@stylistic/js/spaced-comment': 'warn',
'@stylistic/js/computed-property-spacing': 'warn',
'@stylistic/js/object-curly-newline': ['warn', {
ObjectExpression: { 'consistent': true },
ObjectPattern: { 'consistent': true },
ImportDeclaration: 'never',
ExportDeclaration: 'never'
}],
'@stylistic/js/padded-blocks': ['warn', { blocks: 'never', classes: 'always', switches: 'never' }],
'@stylistic/js/space-infix-ops': 'off',
'@stylistic/js/space-before-function-paren': ['warn', 'never']
}
}
];