-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.js
More file actions
94 lines (94 loc) · 3.04 KB
/
Copy path.eslintrc.js
File metadata and controls
94 lines (94 loc) · 3.04 KB
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
module.exports = {
env: {
jest: true,
browser: true,
es2020: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
ecmaFeatures: { jsx: true },
},
plugins: [
'@typescript-eslint',
'react',
'jest',
'prettier',
'sort-imports-es6-autofix',
],
extends: [
'airbnb',
'airbnb/hooks',
'eslint:recommended',
'plugin:react/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
],
settings: {
version: 'detect',
},
rules: {
camelcase: 'off',
'linebreak-style': 0,
'max-len': ['error', { code: 150 }],
'no-bitwise': 'off',
'import/namespace': 'off',
'no-mixed-operators': 'off',
'no-nested-ternary': 'off',
'prefer-regex-literals': 'off',
'@typescript-eslint/member-delimiter-style': [
2,
{ multiline: { delimiter: 'semi', requireLast: true }, singleline: { delimiter: 'semi', requireLast: true } },
],
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'as' }],
'import/no-cycle': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.ts', '.tsx'] }],
'import/extensions': 'off',
'react-hooks/exhaustive-deps': 'off',
'no-plusplus': 'off',
'react/jsx-no-constructed-context-values': 'off',
'react/prop-types': 'off',
'react/jsx-props-no-spreading': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'react/function-component-definition': [2, {
namedComponents: ['function-declaration', 'function-expression', 'arrow-function'],
}],
'jsx-a11y/label-has-associated-control': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{ 'ts-ignore': 'allow-with-description', minimumDescriptionLength: 10 },
],
'react/no-unused-prop-types': 'off',
'react/default-props-match-prop-types': 'off',
'no-use-before-define': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'import/no-named-as-default': 0,
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
],
'global-require': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'import/prefer-default-export': 'off',
'react/react-in-jsx-scope': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/accessible-emoji': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'react/no-unescaped-entities': 'off',
'@typescript-eslint/no-var-requires': 'off',
'import/no-extraneous-dependencies': 'off',
'object-curly-newline': 'off',
'no-confusing-arrow': 'off',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
},
};