-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
47 lines (47 loc) · 1.4 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'prettier',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:react-hooks/recommended',
'plugin:react/recommended',
],
rules: {
'eqeqeq': ['error', 'smart'],
'class-methods-use-this': 'warn',
'@typescript-eslint/no-shadow': 'error',
'no-restricted-syntax': 'error',
'react/react-in-jsx-scope': 'off',
'no-var': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/quotes': ['warn', 'single'],
'@typescript-eslint/no-unused-vars': ['warn', { 'argsIgnorePattern': '^_' }],
'react/hook-use-state': 'warn',
'react/no-typos': 'warn',
'react/prefer-stateless-function': 'warn',
'react/void-dom-elements-no-children': 'error',
'@typescript-eslint/await-thenable': 'error',
'no-return-await': 'error',
},
settings: {
react: {
createClass: 'createReactClass',
pragma: 'React',
fragment: 'Fragment',
version: 'detect',
},
},
parserOptions: {
project: './tsconfig.json',
ecmaVersion: 'latest',
ecmaFeatures: {
jsx: true
}
},
};