-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
83 lines (83 loc) · 2.2 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'plugin:promise/recommended',
],
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: '.',
ecmaVersion: 2018,
sourceType: 'module',
useJSXTextNode: true,
ecmaFeatures: {
jsx: true,
},
},
plugins: [
'@typescript-eslint',
'react',
'jsx-a11y',
'promise',
'import',
],
ignorePatterns: ['node_modules/', 'e2e', '__mocks__'],
rules: {
'react/jsx-filename-extension': ['error', {extensions: ['.jsx', '.tsx']}],
'react/prop-types': 0,
'react/display-name': 0,
'@typescript-eslint/member-delimiter-style': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-explicit-any': 0,
'import/prefer-default-export': 0,
'import/no-named-as-default': 0,
'import/no-unresolved': 0,
'import/no-extraneous-dependencies': 0,
'import/extensions': 0,
'import/order': [
'error',
{
pathGroups: [
{
pattern: 'react',
group: 'external',
position: 'before',
},
{
pattern: '~/**',
group: 'parent',
position: 'before',
},
{
pattern: '@*/**',
group: 'external',
position: 'after',
},
],
pathGroupsExcludedImportTypes: ['react'],
},
],
'sort-imports': ['error', {ignoreDeclarationSort: true}],
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-autofocus': 'off',
'class-methods-use-this': 0,
'no-nested-ternary': 0,
'consistent-return': 0,
'array-callback-return': 0,
'react/jsx-props-no-spreading': 0,
'no-duplicate-imports': 'error',
'promise/prefer-await-to-then': 'error',
'react/state-in-constructor': 'off',
'promise/prefer-await-to-callbacks': 'off',
},
settings: {
react: {
version: 'detect',
},
},
};