-
Notifications
You must be signed in to change notification settings - Fork 335
/
.eslintrc.js
48 lines (48 loc) · 1.2 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
module.exports = {
parser: '@typescript-eslint/parser',
env: {
es6: true,
node: true,
browser: true,
},
plugins: ['react', '@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier',
],
settings: {
react: {
version: '16.2.0',
},
},
rules: {
// Will use the TS version
// 'no-unused-vars': ['error', {ignoreRestSiblings: true}],
// Meh - don't agree with it
'react/no-unescaped-entities': 'off',
// Meh - I don't feel the need for all things to be const
'prefer-const': 'off',
// Not as helpful as it seems. I wa
// '@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-unused-vars': ['error', {ignoreRestSiblings: true}],
'@typescript-eslint/no-inferrable-types': [
'error',
{ignoreParameters: true},
],
},
overrides: [
// Avoid scattering eslintrc files everywhere
{
files: ['src/**/*.test.tsx'],
plugins: ['jest'],
env: {
'jest/globals': true,
},
extends: ['plugin:jest/recommended'],
},
],
};