-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
85 lines (85 loc) · 2.14 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
module.exports = {
extends: [
'eslint-config-airbnb-base',
'prettier',
'prettier/@typescript-eslint',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'eslint-comments',
'react',
'jest',
'unicorn',
'react-hooks',
'simple-import-sort',
],
env: {
browser: true,
node: true,
es6: true,
mocha: true,
jest: true,
jasmine: true,
},
parserOptions: {
project: './tsconfig.json',
ecmaFeatures: {
jsx: true,
},
},
overrides: [
{
files: ['*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['**.tsx', '**.ts'],
rules: {
'import/no-unresolved': 'off',
'import/extensions': 'off',
'@typescript-eslint/no-var-requires': 0,
'operator-assignment': 'off',
},
},
],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.d.ts'],
},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx', '.d.ts'],
},
'import/extensions': ['.js', '.mjs', '.jsx', '.ts', '.tsx', '.d.ts'],
'import/external-module-folders': ['node_modules', 'node_modules/@types'],
polyfills: ['fetch', 'Promise', 'URL', 'object-assign'],
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'import/extensions': 'off',
'import/prefer-default-export': ['warn'],
'react/prop-types': 'off',
'header/header': 'off',
'consistent-return': 'off',
'import/no-dynamic-require': 'off',
'global-require': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'prefer-object-spread': 'warn',
'no-underscore-dangle': 'off',
'no-plusplus': 'off',
'class-methods-use-this': 'off',
'no-new': 'off',
'no-param-reassign': 'warn',
'@typescript-eslint/no-empty-interface': 'off',
'max-classes-per-file': 'off',
camelcase: 'warn',
},
};