-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
54 lines (51 loc) · 1.37 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
const defaultRules = {
quotes: ['error', 'single'],
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
}],
semi: ['error', 'always'],
eqeqeq: ['error', 'always'],
indent: ['error', 4, {
SwitchCase: 1,
}],
'space-before-function-paren': 'off',
curly: 'off',
'no-new-func': 'off',
'no-tabs': 'off',
'no-new': 'off',
};
module.exports = {
root: true,
env: {
es2022: true,
},
rules: defaultRules,
extends: ['standard'],
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: [
'standard',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
parserOptions: {
project: './tsconfig.json',
},
rules: {
...defaultRules,
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'space-before-function-paren': 'off',
'@typescript-eslint/space-before-function-paren': 'off',
},
},
],
};