-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
55 lines (53 loc) · 1.39 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
import typescriptParser from '@typescript-eslint/parser';
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
const rules = {
'array-callback-return': 'error',
'no-constant-binary-expression': 'error',
'no-self-compare': 'error',
'no-template-curly-in-string': 'error',
'no-unmodified-loop-condition': 'error',
'no-unreachable-loop': 'error',
'arrow-body-style': ['error', 'as-needed'],
'block-scoped-var': 'error',
'curly': ['error', 'all'],
'dot-notation': 'error',
'no-eval': 'error',
'no-implied-eval': 'error',
'no-var': 'error',
'one-var': ['error', 'never'],
'prefer-arrow-callback': 'error',
'prefer-const': 'error',
"yoda": 'error',
'array-bracket-newline': ['error', { multiline: true }],
'brace-style': 'error',
'no-shadow': 'error',
'no-use-before-define': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', {
varsIgnorePattern: '^_',
argsIgnorePattern: '^_'
}]
};
export default [
{
files: ["**/*.ts"],
ignores: [
"custom-theme.ts",
"src/service-worker.ts",
"tailwind.config.ts"
],
languageOptions: {
parser: typescriptParser,
parserOptions: {
project: "./tsconfig.json",
},
},
plugins: {
"@typescript-eslint": typescriptPlugin,
},
rules: {
...typescriptPlugin.configs.recommended.rules,
...rules
},
},
];