-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
42 lines (41 loc) · 1.45 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
import eslint from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
export default [
// Basic eslint rules
eslint.configs.recommended,
// Codestyle rules for JS
stylistic.configs["recommended-flat"],
{
languageOptions: {
// Add node globals to ignore undefined
globals: {
"__dirname": false,
"__filename": false,
"console": false,
"module": false,
"process": false,
"require": false,
"setTimeout": false,
}
},
rules: {
// Allow unused vars
"no-unused-vars": ["off", 0],
// Allow "exports"
"no-undef": ["off", 0],
// Always require semicolons
"@stylistic/semi": ["error", "always"],
// Stick to double quotes
"@stylistic/quotes": ["error", "double"],
// Enforce "one true brace style"
"@stylistic/brace-style": ["error", "1tbs"],
// Enforce parenthesis in functions: "(a) => a"
"@stylistic/arrow-parens": ["error", "always"],
// Disabled rules that collide with Prettier formatter
"@stylistic/member-delimiter-style": ["off", 0],
"@stylistic/no-mixed-operators": ["off", 0],
"@stylistic/operator-linebreak": ["off", 0],
"@stylistic/quote-props": ["off", 0],
}
}
];