forked from XeroAPI/xero-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
73 lines (73 loc) · 2.35 KB
/
.eslintrc.json
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
{
"env": {
"commonjs": true,
"es6": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
// "plugin:prettier/recommended", // need to be uncommented on full run
"prettier/@typescript-eslint"
],
"rules": {
// Following line need to be uncommented before full run in separated PR
// "linebreak-style": ["error", "windows"],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-explicit-any": "off",
// ---------- tslint.json rules -------------
// not enforced by abode presets
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
// were switched off in TSLint config
"@typescript-eslint/explicit-member-accessibility": [
"off",
{
"overrides": {
"constructors": "off"
}
}
],
"@typescript-eslint/array-type": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/member-ordering": "off",
// existing errors lowered to warn - NEED TO REFACTOR later
"no-prototype-builtins": "warn",
"@typescript-eslint/no-inferrable-types": "warn"
},
"overrides": [
{
"files": ["**/__tests__/**", "**/__tests__/**", "**/*.test.ts"],
"env": {
"jest": true
},
"rules": {
// relaxed settings for tests - any test is better than no test!
"no-useless-catch": "warn",
"no-useless-escape": "warn",
"@typescript-eslint/prefer-includes": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/prefer-regexp-exec": "warn",
"@typescript-eslint/no-inferrable-types": "warn",
"@typescript-eslint/array-type": "warn",
"require-atomic-updates": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-use-before-define": "off"
}
}
]
}