-
Notifications
You must be signed in to change notification settings - Fork 676
/
eslint.config.js
53 lines (52 loc) · 1.58 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
49
50
51
52
53
const globals = require('globals');
const html = require('eslint-plugin-html');
const stylistic = require('@stylistic/eslint-plugin-js');
module.exports = [
{
languageOptions: {
globals: {
...globals.browser,
L: true,
module: false,
define: false,
require: true,
},
ecmaVersion: 6,
sourceType: 'script',
},
plugins: {
'@stylistic/js': stylistic,
},
rules: {
camelcase: 2,
'@stylistic/js/quotes': [2, 'single', 'avoid-escape'],
'@stylistic/js/no-mixed-spaces-and-tabs': [2, 'smart-tabs'],
'@stylistic/js/space-before-function-paren': 2,
'@stylistic/js/space-in-parens': 2,
'@stylistic/js/object-curly-spacing': 2,
'@stylistic/js/array-bracket-spacing': 2,
'@stylistic/js/computed-property-spacing': 2,
'@stylistic/js/space-before-blocks': 2,
'@stylistic/js/keyword-spacing': 2,
'no-lonely-if': 2,
'@stylistic/js/comma-style': 2,
'no-underscore-dangle': 0,
'no-constant-condition': 0,
'@stylistic/js/no-multi-spaces': 0,
strict: 0,
'@stylistic/js/key-spacing': 0,
'no-shadow': 0,
'no-unused-vars': 2,
eqeqeq: 2,
},
},
{
files: ['**/*.html'],
plugins: {
html,
},
settings: {
'html/report-bad-indent': 2,
},
}
];