forked from kgram/react-equation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
79 lines (73 loc) · 2.56 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
],
plugins: [
'react',
'@typescript-eslint',
],
env: {
browser: true,
},
rules: {
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }],
'semi': ['error', 'never'],
'comma-dangle': ['error', {
'arrays': 'always-multiline',
'objects': 'always-multiline',
'imports': 'always-multiline',
'exports': 'always-multiline',
'functions': 'always-multiline',
}],
'@typescript-eslint/member-delimiter-style': ['error', {
'multiline': {
'delimiter': 'comma',
'requireLast': true,
},
'singleline': {
'delimiter': 'comma',
'requireLast': false,
},
'overrides': {
'interface': {
'multiline': {
'delimiter': 'none',
'requireLast': false,
},
'singleline': {
'delimiter': 'semi',
'requireLast': false,
},
},
},
}],
// Allow using rest destructuring to omit variables without complaint
'@typescript-eslint/no-unused-vars': ['error', { 'ignoreRestSiblings': true }],
'no-undef': 'off',
// does not work with ts-parser because of comments
'no-empty': 'off',
'@typescript-eslint/indent': ['error', 4, { SwitchCase: 1 }],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-misused-new': 'off',
'@typescript-eslint/prefer-interface': 'off',
'@typescript-eslint/generic-type-naming': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
// Is triggered by <T extends any>, which is necessary for generics in .tsx files
'@typescript-eslint/no-unnecessary-type-constraint': 'off',
// This just causes noise, the problems highlighted aren't actually problems
'@typescript-eslint/ban-types': 'off',
},
}