forked from tinovyatkin/pass-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
109 lines (109 loc) · 3.17 KB
/
.eslintrc
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
104
105
106
107
108
109
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"project": "./tsconfig.all.json",
"sourceType": "module"
},
"plugins": ["@destinationstransfers", "@typescript-eslint"],
"extends": [
"plugin:@destinationstransfers/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
"prettier/@typescript-eslint"
],
"env": {
"node": true,
"browser": false
},
"rules": {
"no-undef": "off", // conflicts with optional bindings
"@typescript-eslint/no-use-before-define": "off", // conflicts with optonal binding
"prettier/prettier": "off",
"@destinationstransfers/prefer-class-properties": "off",
"node/no-unsupported-features/es-syntax": "off",
"node/no-unsupported-features/node-builtins": [
"error",
{ "ignores": ["fs.promises"] }
],
"import/no-unresolved": "off",
"dependencies/no-unresolved": "off",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{ "allowExpressions": true, "allowTypedFunctionExpressions": true }
],
"@typescript-eslint/consistent-type-assertions": [
"error",
{
"assertionStyle": "as",
"objectLiteralTypeAssertions": "allow-as-parameter" // Allow type assertion in call and new expression, default false
}
],
"@typescript-eslint/no-this-alias": [
"error",
{
"allowDestructuring": true // Allow `const { props, state } = this`; false by default
}
],
// note you must disable the base rule as it can report incorrect errors
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true,
"argsIgnorePattern": "^next$",
"caughtErrors": "none"
}
],
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"Array": null,
"Object": "Use {} instead",
"String": {
"message": "Use string instead",
"fixWith": "string"
}
}
}
],
// requires project
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/no-for-in-array": "error"
},
"overrides": [
{
"files": ["__tests__/*.ts", "*.test.ts"],
"env": {
"jest": true
},
"rules": {
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/explicit-function-return-type": "off"
}
}
],
"settings": {
"import/extensions": [".ts"],
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
}
}
}