/
.eslintrc.js
46 lines (46 loc) · 1.1 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'airbnb-typescript-prettier'
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
project: 'tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
ignorePatterns: ['**/*.d.ts', '**/*.config.js', '**/*.js'],
env: {
jest: true,
},
rules: {
'react/jsx-props-no-spreading': ['off'],
'class-methods-use-this': 'off',
'react/prop-types': 'off',
'import/no-extraneous-dependencies': ['off'],
'import/no-named-as-default': ['off'],
'no-useless-constructor': ['off'],
'prettier/prettier': ['error', { endOfLine: 'auto' }],
'jsx-a11y/anchor-is-valid': ['off'],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
// This rule doesn't work with TS
'react/static-property-placement': ['off'],
},
overrides: [
{
files: ['*.tsx'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': ['off'],
},
},
],
settings: {
react: {
version: 'detect',
},
},
}