This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
109 lines (108 loc) · 3.35 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
const path = require('path');
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
'jest/globals': true
},
extends: [
'plugin:react/recommended',
'plugin:import/typescript',
'airbnb',
'airbnb-typescript',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 7,
},
plugins: [
'react',
'@typescript-eslint',
'jest',
'testing-library'
],
rules: {
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/no-implied-eval': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'@typescript-eslint/return-await': 'off',
'import/prefer-default-export': 'off',
'max-len': ['error', { code: 200, ignoreTemplateLiterals: true, ignoreStrings: true }],
'import/no-extraneous-dependencies': 'off',
'react/jsx-filename-extension': 'off',
'semi': 'error',
'object-curly-spacing': 'error',
'indent': ['error', 2],
'quotes': ['error', 'single', { 'allowTemplateLiterals': true, 'avoidEscape': true }],
'space-before-blocks': 'error',
'no-param-reassign': 'off',
'consistent-this': ['error', 'self'],
curly: ['error', 'all'],
'max-classes-per-file': 'off',
'no-alert': 'error',
'arrow-body-style': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'func-names': 'error',
'no-constant-condition': 'error',
'no-prototype-builtins': 'off',
'no-underscore-dangle': 'error',
'nonblock-statement-body-position': 'error',
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],
'prefer-destructuring': 'off',
'dot-notation': 'error',
'no-implied-eval': 'error',
'no-throw-literal': 'error',
'no-return-await': 'error',
'import/named': 'off',
'import/no-webpack-loader-syntax': 'off',
'jsx-a11y/label-has-associated-control': ['error', { assert: 'either' }],
'jsx-a11y/no-autofocus': 'off',
'react/default-props-match-prop-types': ['error', { allowRequiredDefaults: true }],
'react/destructuring-assignment': 'off',
'react/forbid-prop-types': 'off',
'react/jsx-curly-brace-presence': 'off',
'react/jsx-fragments': ['error', 'element'],
'react/jsx-no-bind': 'off',
'react/jsx-props-no-spreading': 'off',
'react/no-array-index-key': 'off',
'react/no-danger': 'error',
'react/no-direct-mutation-state': 'error',
'react/require-default-props': 'off',
'react/sort-prop-types': 'error',
'react/state-in-constructor': 'off',
'react/static-property-placement': 'off',
'react/react-in-jsx-scope': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'react/no-arrow-function-lifecycle': 'off',
'react/no-invalid-html-attribute': 'off',
'react/no-unused-class-component-methods': 'off',
'jsx-a11y/alt-text': 'off',
'react/function-component-definition': 'off'
},
settings: {
'import/resolver': {
webpack: {
config: path.join(__dirname, './webpack.config.js'),
},
},
},
overrides: [
{
files: ['*.d.ts'],
rules: {
'import/export': 'off',
},
},
{
'files': ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
'extends': ['plugin:testing-library/react'],
rules: {
'testing-library/prefer-screen-queries': 'off',
'testing-library/no-node-access': 'off'
}
},
]
};