-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
41 lines (41 loc) · 1.28 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'react-hooks'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
env: {
browser: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
project: './tsconfig.json',
},
rules: {
'import/prefer-default-export': 0,
'react/prop-types': 0,
'react/jsx-one-expression-per-line': 0,
'react/jsx-props-no-spreading': 0,
'react/display-name': 0,
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/no-unnecessary-type-assertion': 1,
'@typescript-eslint/no-unnecessary-qualifier': 1,
'@typescript-eslint/no-for-in-array': 1,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/explicit-function-return-type': ['error'],
'@typescript-eslint/no-use-before-define': 0,
'react-hooks/rules-of-hooks': 1,
'react-hooks/exhaustive-deps': 1,
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
},
settings: {
react: {
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
},
},
};