-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
69 lines (67 loc) · 1.77 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json'
},
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: "^_" }],
'@typescript-eslint/type-annotation-spacing': ['error'],
'array-bracket-spacing': ['error', 'never'],
'arrow-spacing': ['error'],
'comma-dangle': ['off', 'ignore'],
'comma-spacing': ['error', { before: false, after: true }],
// Indentation
// Disable the typical indenting in favor of TypeScript indenting as per:
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md
// It works for JavaScript files.
indent: 'off',
'@typescript-eslint/indent': ['error', 'tab', { SwitchCase: 1 }],
'key-spacing': ['error'],
'keyword-spacing': ['error'],
'linebreak-style': ['error', 'unix'],
'no-tabs': 0,
'no-trailing-spaces': ['error', { skipBlankLines: false, ignoreComments: false, }],
'object-curly-spacing': ['error', 'always'],
'operator-linebreak': ['off'],
quotes: ['off'],
semi: ['error', 'never'],
'space-before-function-paren': [2, {
named: 'never',
anonymous: 'always',
asyncArrow: 'always'
}],
'space-in-parens': ['error', 'never'],
'space-infix-ops': ['error', { int32Hint: false }],
},
env: {
node: true,
},
ignorePatterns: [
//Other projects
'/core/',
'/extension/',
'/react-core/',
'/site/',
// Coverage
'/coverage/',
// Build
'/build/',
'/dist/',
'/lib/',
'/out/',
// Other
'node_modules/',
'/.yarn/',
'/.git*',
]
}