-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
66 lines (65 loc) · 1.89 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
'plugin:jsx-a11y/recommended',
'plugin:import/typescript',
'plugin:jest/recommended',
'plugin:jest/style',
],
plugins: [
'import',
'jest',
'jsx-a11y',
'react',
'react-hooks',
'testing-library',
'simple-import-sort',
],
parserOptions: {
ecmaVersion: 2019, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
project: ['./tsconfig.json'],
},
rules: {
'prettier/prettier': ['error', require('./.prettierrc.json')],
curly: ['error', 'multi-line', 'consistent'],
'import/first': 'error',
'import/no-duplicates': 'error',
'prefer-const': ['error', { destructuring: 'all' }],
quotes: ['error', 'single', { allowTemplateLiterals: true }],
'react/display-name': 'off',
'react/prop-types': 'off',
'react/jsx-curly-brace-presence': ['error', 'never'],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'simple-import-sort/imports': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true, argsIgnorePattern: '^_' },
],
'@typescript-eslint/explicit-member-accessibility': [
'warn',
{ accessibility: 'no-public' },
],
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
'@typescript-eslint/no-misused-promises': 'error',
},
settings: {
react: {
version: 'detect',
},
jest: {
version: 25,
},
},
}