-
-
Notifications
You must be signed in to change notification settings - Fork 95
/
eslint.config.js
45 lines (44 loc) · 1.55 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
import js from "@eslint/js";
import globals from 'globals';
export default {
...js.configs.recommended,
files: ["src/**/*.js", "test/**/*.test.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.node
}
},
rules: {
'array-bracket-spacing': ['warn', 'never'],
'brace-style': [2, '1tbs', { 'allowSingleLine': true }],
'camelcase': 'off',
'curly': ['error', 'all'],
'eol-last': 'error',
'indent': ['error', 'tab', { 'SwitchCase': 1 }],
'keyword-spacing': ['error'],
'linebreak-style': ['error', 'unix'],
'max-len': ['error', 200],
'no-case-declarations': 'off',
'no-cond-assign': 'off',
'no-console': 'off',
'no-control-regex': 'off',
'no-empty': 'off',
'no-inner-declarations': 'off',
'no-mixed-spaces-and-tabs': 'error',
'no-multi-str': 'error',
'no-multiple-empty-lines': 'error',
'no-regex-spaces': 'off',
'no-trailing-spaces': 'error',
'no-unused-vars': 'off',
'no-useless-escape': 'warn',
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', { 'anonymous': 'always', 'named': 'ignore', 'asyncArrow': 'always' }],
'space-in-parens': ['error', 'never'],
'space-infix-ops': 'error',
'space-unary-ops': ['error', { 'nonwords': false, 'overrides': {} }]
}
};