This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
102 lines (86 loc) · 2.77 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
module.exports = {
root: true,
parser: '@typescript-eslint/parser', // or 'babel-eslint'
plugins: [
'eslint-plugin-compat',
'eslint-plugin-jest',
'eslint-plugin-prettier',
'eslint-plugin-promise',
'eslint-plugin-react-hooks',
'eslint-plugin-import',
'@typescript-eslint',
// 'eslint-plugin-jsx-a11y',
// 'eslint-plugin-security',
// 'eslint-plugin-unicorn',
],
extends: [
'eslint-config-standard-with-typescript',
'eslint-config-prettier',
'eslint-config-prettier/react',
'eslint-config-prettier/standard',
'eslint-config-prettier/@typescript-eslint',
'plugin:eslint-plugin-eslint-comments/recommended',
'plugin:eslint-plugin-jest/recommended',
'plugin:eslint-plugin-promise/recommended',
'plugin:eslint-plugin-react/recommended',
'plugin:eslint-plugin-import/errors',
'plugin:eslint-plugin-import/typescript',
// 'plugin:@typescript-eslint/recommended',
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
// 'plugin:eslint-plugin-jsx-a11y/recommended',
// 'plugin:eslint-plugin-security/recommended',
// 'plugin:eslint-plugin-unicorn/recommended',
],
ignorePatterns: ['node_modules', 'build', 'coverage'],
parserOptions: {
sourceType: 'module',
impliedStrict: true,
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
env: {
es6: true,
browser: true,
jest: true,
},
settings: {
react: {
version: 'detect',
},
polyfills: ['Promise', 'Array.from', 'Object.entries'],
'import/resolver': {
'babel-module': {},
},
},
rules: {
// eslint
'no-param-reassign': 'error',
// eslint-plugin-react
'react/no-unescaped-entities': 'off',
// eslint-plugin-react-hooks
'react-hooks/rules-of-hooks': 'error',
// eslint-plugin-prettier
'prettier/prettier': 'error',
// eslint-plugin-compat
'compat/compat': 'error',
// eslint-plugin-import
'import/no-unused-modules': ['error', { unusedExports: true }],
'import/no-unresolved': 'off',
// eslint-plugin-eslint-comments
'eslint-comments/no-unused-disable': 'error',
// @typescript-eslint
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/require-array-sort-compare': [
'error',
{ ignoreStringArrays: true },
],
'@typescript-eslint/default-param-last': 'off', // Problem setting Redux reducer initial state
// TODO: Enable these
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
};