-
Notifications
You must be signed in to change notification settings - Fork 3
/
eslint.config.js
56 lines (47 loc) · 1.21 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
54
55
56
import js from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
import globals from 'globals';
import ts from 'typescript-eslint';
export default ts.config(
js.configs.recommended,
...ts.configs.strictTypeChecked,
...ts.configs.stylisticTypeChecked,
{
languageOptions: {
ecmaVersion: 2022,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
project: true,
tsconfigRootDir: import.meta.dirname,
},
sourceType: 'module',
globals: {
...globals['shared-node-browser'],
...globals.node,
},
},
plugins: {
'@stylistic': stylistic,
},
rules: {
'@stylistic/no-trailing-spaces': 'off',
'@stylistic/quotes': [
'error',
'single',
{
allowTemplateLiterals: true,
avoidEscape: true,
}
],
'@stylistic/semi': ['error', 'always'],
'@stylistic/space-in-parens': 'error',
'no-console': [ 1, { allow: [ 'error' ]}],
'no-empty': [ 2, { allowEmptyCatch: true }],
// 'no-use-before-define': [ 'off', { functions: false, classes: false }],
'no-sequences': 'error',
'sort-imports': 'error',
}
}
);