-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
70 lines (70 loc) · 1.91 KB
/
.eslintrc.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
module.exports = {
env: {
browser: true,
node: true
},
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json'
},
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['script/*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off'
}
}
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking'
],
// https://eslint.org/docs/latest/user-guide/configuring/
rules: {
'space-unary-ops':'error',
'spaced-comment':'error',
'space-infix-ops':'error',
'space-in-parens':'error',
'space-before-function-paren':'error',
'space-before-blocks':'error',
'semi-spacing':'error',
'indent': ['error', 2],
'no-multi-spaces': ['error'],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn",
'no-multiple-empty-lines': ['error', { max: 1 }],
'camelcase': ['error', { properties: 'never' }],
'curly': ["error", "multi-line"],
'eqeqeq': 'error',
'no-else-return': 'error',
'default-case': 'error',
'no-fallthrough': 'error',
'no-unneeded-ternary': 'error',
'quotes': ['error', 'single'],
'prefer-template': 'error',
'no-path-concat': 'error',
'no-useless-concat': 'error',
'no-prototype-builtins': 'error',
'dot-notation': 'error',
'no-extend-native': 'error',
'no-new-object': 'error',
'object-shorthand': ['error', 'always'],
'no-array-constructor': 'error',
'new-cap': 'error',
'no-extra-parens': 'error',
'no-extra-semi': 'error',
"@typescript-eslint/consistent-type-imports": "warn"
},
// https://eslint.org/docs/latest/user-guide/configuring/ignoring-code#the-eslintignore-file
ignorePatterns: [
'dist',
'.*',
"*.config.*",
"/script/*",
"test"
]
}