-
Notifications
You must be signed in to change notification settings - Fork 11
/
.eslintrc.js
91 lines (91 loc) · 2.72 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
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
'prettier',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'airbnb',
],
globals: {
JSX: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint'],
rules: {
'prettier/prettier': ['error', { endOfLine: 'auto' }],
'linebreak-style': ['error', 'unix'],
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'object-curly-newline': 'off',
'prefer-const': 'warn',
'no-confusing-arrow': 'off',
'import/no-unresolved': 'off',
'import/extensions': 'off',
'import/order': 'warn',
'no-useless-return': 'off',
'no-param-reassign': ['error', { props: false }],
'arrow-body-style': 'off',
'react/jsx-props-no-spreading': 'off',
'react/destructuring-assignment': 'off',
'react/prop-types': 'off',
'arrow-parens': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/require-default-props': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'no-use-before-define': 'off',
'no-underscore-dangle': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }],
'react/jsx-wrap-multilines': 'off',
'operator-linebreak': 'off',
'implicit-arrow-linebreak': 'off',
'function-paren-newline': 'off',
'no-plusplus': 'off',
'no-continue': 'off',
'react/jsx-curly-newline': 'off',
'max-len': ['error', { code: 120 }],
'react-hooks/rules-of-hooks': 'error',
'no-shadow': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-shadow': 'error',
'react/no-danger': 'off',
'react/no-array-index-key': 'off',
'no-console': 'off',
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
};