-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
131 lines (130 loc) · 3.39 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:node/recommended',
'plugin:unicorn/recommended'
],
parser: '@typescript-eslint/parser',
plugins: [
'unicorn',
'import',
'node',
'@typescript-eslint/eslint-plugin',
],
env: {
node: true
},
globals: {
// TODO: remove use of fail() across the project because Jest Circus doesn't support it
'fail': true
},
rules: {
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_' },
],
'array-bracket-spacing': [
'error',
'never'
],
'computed-property-spacing': [
'error',
'never'
],
'import/order': [
'error',
{
'alphabetize': {
'order': 'asc'
},
'newlines-between': 'always'
}
],
'no-case-declarations': 'off',
'no-debugger': 'error',
'no-empty': 'off',
'no-mixed-spaces-and-tabs': 'error',
'no-multiple-empty-lines': [
'error',
{
'max': 2,
'maxBOF': 1
}
],
'no-prototype-builtins': 'off',
'no-unused-vars': 'off',
'node/no-unpublished-require': 'warn',
'object-curly-spacing': [
'error',
'always'
],
'semi': [
'error',
'always'
],
'quotes': ['error', 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true
}],
'unicorn/expiring-todo-comments': ['warn',
{
allowWarningComments: false,
}
],
// TODO: enable some of unicorn rules
'unicorn/better-regex': 'off',
'unicorn/catch-error-name': 'off',
'unicorn/consistent-destructuring': 'off',
'unicorn/consistent-function-scoping': 'off',
'unicorn/empty-brace-spaces': 'off',
'unicorn/error-message': 'off',
'unicorn/explicit-length-check': 'off',
'unicorn/filename-case': 'off',
'unicorn/import-style': 'off',
'unicorn/new-for-builtins': 'off',
'unicorn/no-abusive-eslint-disable': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-array-for-each': 'off',
'unicorn/no-array-reduce': 'off',
'unicorn/no-await-expression-member': 'off',
'unicorn/no-lonely-if': 'off',
'unicorn/no-nested-ternary': 'off',
'unicorn/no-new-array': 'off',
'unicorn/no-null': 'off',
'unicorn/no-object-as-default-parameter': 'off',
'unicorn/no-useless-undefined': 'off',
'unicorn/number-literal-case': 'off',
'unicorn/numeric-separators-style': 'off',
'unicorn/prefer-add-event-listener': 'off',
'unicorn/prefer-array-some': 'off',
'unicorn/prefer-array-flat': 'off',
'unicorn/prefer-includes': 'off',
'unicorn/prefer-module': 'off',
'unicorn/prefer-number-properties': 'off',
'unicorn/prefer-object-from-entries': 'off',
'unicorn/prefer-optional-catch-binding': 'off',
'unicorn/prefer-regexp-test': 'off',
'unicorn/prefer-spread': 'off',
'unicorn/prefer-string-slice': 'off',
'unicorn/prefer-string-starts-ends-with': 'off',
'unicorn/prefer-string-trim-start-end': 'off',
'unicorn/prefer-ternary': 'off',
'unicorn/prevent-abbreviations': 'off',
},
overrides: [
{
files: ['*.test.{js,ts}', '**/{__mocks__,__tests__}/*.{js, ts}'],
plugins: [
'no-only-tests',
],
env: {
jest: true
},
rules: {
'no-only-tests/no-only-tests': 'error',
}
}
]
};