This repository has been archived by the owner on May 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
67 lines (65 loc) · 2.08 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
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier'],
extends: ['plugin:@typescript-eslint/recommended', 'prettier'],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
rules: {
// Turn off certain typescript-eslint rules
'@typescript-eslint/no-unused-vars': 0, // This is enabled in our tsconfig file becuase the lint doens't support JSX usage
'@typescript-eslint/array-type': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/prefer-interface': 0,
'@typescript-eslint/prefer-namespace-keyword': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/no-parameter-properties': 0,
// https://github.com/typescript-eslint/typescript-eslint/issues/249
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/no-object-literal-type-assertion': 0,
'@typescript-eslint/indent': 0,
// Override certain typescript-eslint rules
'@typescript-eslint/member-delimiter-style': [
2,
{
multiline: {
delimiter: 'none',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
'@typescript-eslint/explicit-member-accessibility': [
2,
{
accessibility: 'no-public',
overrides: {parameterProperties: 'explicit'},
},
],
'@typescript-eslint/interface-name-prefix': [2, 'always'],
// Turn on the prettier rules
'prettier/prettier': 'error',
// This is a weird one and needs to be duped here and .prettierrc
// https://github.com/prettier/eslint-config-prettier#max-len
'max-len': [
2,
{
code: 140,
tabWidth: 2,
ignoreUrls: true,
ignoreComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
},
],
},
}