-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
73 lines (71 loc) · 1.96 KB
/
eslint.config.js
File metadata and controls
73 lines (71 loc) · 1.96 KB
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
67
68
69
70
71
72
73
import { defineConfig } from 'eslint/config';
import js from '@eslint/js';
import globals from 'globals';
import stylistic from '@stylistic/eslint-plugin';
export default defineConfig([
js.configs.recommended,
{
languageOptions: {
globals: {
...globals.node,
},
ecmaVersion: 2025,
sourceType: 'module',
parserOptions: {
ecmaFeatures: {
impliedStrict: true,
},
},
},
plugins: {
'@stylistic': stylistic
},
rules: {
'@stylistic/semi': 1,
'@stylistic/semi-style': 2,
'@stylistic/semi-spacing': 1,
'@stylistic/quotes': ['warn', 'single', {
avoidEscape: true,
allowTemplateLiterals: 'never',
}],
'@stylistic/brace-style': 2,
'@stylistic/indent': ['error', 2],
'@stylistic/spaced-comment': 1,
'@stylistic/no-multi-spaces': 1,
'@stylistic/wrap-iife': ['error', 'inside'],
'@stylistic/linebreak-style': 1,
'@stylistic/template-curly-spacing': 1,
'camelcase': 2,
'eqeqeq': ['error', 'smart'],
'curly': ['error', 'all'],
'dot-notation': 2,
'no-array-constructor': 2,
'no-throw-literal': 2,
'no-self-compare': 2,
'no-useless-call': 1,
'consistent-return': 2,
'no-new-wrappers': 2,
'no-script-url': 2,
'no-console': 1,
'no-void': 1,
'vars-on-top': 1,
'yoda': ['error', 'never'],
/* 'no-warning-comments': 1, */ // should be enabled later
'require-await': 1,
'no-loop-func': 2,
'no-eval': 2,
'no-implied-eval': 2,
'no-var': 1,
'prefer-const': 2,
'prefer-arrow-callback': 1,
'prefer-rest-params': 2,
'prefer-spread': 2,
'prefer-template': 1,
'symbol-description': 2,
'object-shorthand': 1,
'prefer-promise-reject-errors': 2,
/* 'prefer-destructuring': 1, */ // https://github.com/eslint/eslint/issues/10250
'no-object-constructor': 2,
},
}
]);