-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.eslintrc.js
59 lines (59 loc) · 1.42 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
module.exports = {
env: {
es6: true,
node: true,
jest: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
],
globals: {
window: true,
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
__DEV__: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'react',
'typescript',
'@typescript-eslint',
'eslint-plugin-import-helpers',
],
rules: {
// disable the rule for all files
'@typescript-eslint/explicit-function-return-type': 'off',
'no-console': 'warn',
'no-unused-vars': 'error',
'object-curly-spacing': ['error', 'always'],
semi: 'error',
'react/display-name': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'import-helpers/order-imports': [
'error',
{
newlinesBetween: 'always',
groups: ['module', '/^@(components|locales|routes|navigator|styles|store|utils|models|lib|assets|errors)|src/', ['parent', 'sibling', 'index']],
alphabetize: { order: 'asc', ignoreCase: true },
},
],
},
overrides: [
{
files: ['*.test.ts', '*.test.tsx', '*.mock.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
],
};