-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy patheslint.config.mjs
66 lines (65 loc) · 1.91 KB
/
eslint.config.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import eslintJS from '@eslint/js';
import eslintPluginHtml from 'eslint-plugin-html';
import globals from 'globals';
export default [
eslintJS.configs.recommended,
{
files: ['test/**'],
languageOptions: {
globals: {
...globals.mocha,
...globals.jest,
chai: true,
happen: true
}
},
},
{
files: ['**/*.js', '**/*.mjs', '**/*.html'],
languageOptions: {
globals: {
...globals.node,
...globals.browser,
...globals.es6,
L: true,
},
},
plugins: {
html: eslintPluginHtml,
},
settings: {
'html/indent': 'space',
'html/report-bad-indent': 2
},
rules: {
camelcase: 'error',
'comma-spacing': ['error', {after: true}],
'comma-style': 'error',
indent: ['error', 4],
'key-spacing': 'error',
'keyword-spacing': 'error',
'no-console': 'error',
'no-constant-condition': 'off',
'no-lonely-if': 'error',
'no-multi-spaces': 'error',
'no-shadow': 'off',
'no-trailing-spaces': 'error',
'no-underscore-dangle': 'off',
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'object-curly-spacing': 'error',
quotes: ['error', 'single', 'avoid-escape'],
'space-before-blocks': 'error',
'space-before-function-paren': ['error', 'never'],
'space-in-parens': 'error',
semi: ['error', 'always'],
strict: 'off'
},
},
];