-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.js
More file actions
103 lines (102 loc) · 3.01 KB
/
.eslintrc.js
File metadata and controls
103 lines (102 loc) · 3.01 KB
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
103
const confusingGlobals = require('confusing-browser-globals')
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
node: true,
'jest/globals': true,
},
extends: [
// 'eslint:recommended',
// 'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
],
plugins: ['jest', 'react', 'prettier', 'react-hooks'],
rules: {
'no-restricted-globals': ['error'].concat(confusingGlobals),
indent: 'off',
'no-param-reassign': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-object-literal-type-assertion': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/prefer-interface': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/indent': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'react/no-unescaped-entities': 'off',
'linebreak-style': ['error', 'unix'],
semi: ['error', 'never'],
'no-console': 'off',
'no-unused-vars': 'off',
'no-undef': 'error',
'no-native-reassign': 'error',
'no-constant-condition': 'off',
'react/prop-types': 'off',
'react/display-name': 'off',
'react/jsx-uses-vars': 2,
'react/jsx-uses-react': 'error',
'no-case-declarations': 'off',
'no-debugger': 'off',
'no-shadow': 'off',
// '@typescript-eslint/tslint/config': [
// 'warn',
// {
// rules: {
// extends: ['tslint:recommended', 'tslint-react'],
// jsRules: {},
// rules: {
// 'arrow-parens': [true, 'ban-single-arg-parens'],
// 'object-literal-sort-keys': false,
// 'ordered-imports': false,
// quotemark: [true, 'single', 'jsx-double'],
// 'trailing-comma': false,
// 'variable-name': [true, 'allow-leading-underscore', 'allow-pascal-case'],
// },
// rulesDirectory: [],
// },
// },
// ],
},
settings: {
react: {
version: 'detect',
},
},
globals: {
name: false, // causes so many bugs...
require: true,
module: true,
process: true,
emit: true,
__dirname: true,
exports: true,
BroadcastChannel: true,
Promise: true,
Set: true,
Map: true,
debug: true,
Reflect: true,
Proxy: true,
Symbol: true,
electronRequire: true,
WeakMap: true,
__webpack_require__: true,
},
}