@clipboard-health/eslint-config 2.4.13 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/package.json +1 -1
- package/src/deprecated.d.ts +216 -0
- package/src/deprecated.d.ts.map +1 -0
- package/src/deprecated.js +325 -0
- package/src/deprecated.js.map +1 -0
- package/src/index.d.ts +35 -192
- package/src/index.js +73 -302
- package/src/index.js.map +1 -1
- package/src/{xo-react.d.ts → react.d.ts} +1 -1
- package/src/react.d.ts.map +1 -0
- package/src/{xo-react.js → react.js} +2 -2
- package/src/react.js.map +1 -0
- package/src/xo-react.d.ts.map +0 -1
- package/src/xo-react.js.map +0 -1
- package/src/xo.d.ts +0 -48
- package/src/xo.d.ts.map +0 -1
- package/src/xo.js +0 -56
- package/src/xo.js.map +0 -1
package/src/index.d.ts
CHANGED
|
@@ -1,211 +1,54 @@
|
|
|
1
|
+
declare const _extends: string[];
|
|
2
|
+
export { _extends as extends };
|
|
1
3
|
export declare const parser: string;
|
|
2
4
|
export declare namespace parserOptions {
|
|
3
5
|
const project: string[];
|
|
4
6
|
const tsconfigRootDir: string;
|
|
5
7
|
}
|
|
6
8
|
export declare const plugins: string[];
|
|
7
|
-
declare const _extends: string[];
|
|
8
|
-
export { _extends as extends };
|
|
9
|
-
export declare const root: boolean;
|
|
10
|
-
export declare namespace env {
|
|
11
|
-
const es2022: boolean;
|
|
12
|
-
const node: boolean;
|
|
13
|
-
const jest: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const ignorePatterns: string[];
|
|
16
9
|
export declare const rules: {
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
})[];
|
|
21
|
-
"func-style": (string | {
|
|
22
|
-
allowArrowFunctions: boolean;
|
|
23
|
-
})[];
|
|
24
|
-
"sort-imports": string;
|
|
25
|
-
"simple-import-sort/imports": string;
|
|
26
|
-
"simple-import-sort/exports": string;
|
|
27
|
-
"@typescript-eslint/consistent-indexed-object-style": string[];
|
|
28
|
-
"@typescript-eslint/consistent-type-assertions": (string | {
|
|
29
|
-
assertionStyle: string;
|
|
30
|
-
})[];
|
|
31
|
-
"@typescript-eslint/explicit-module-boundary-types": (string | {
|
|
32
|
-
allowArgumentsExplicitlyTypedAsAny: boolean;
|
|
33
|
-
})[];
|
|
34
|
-
"@typescript-eslint/no-invalid-void-type": string;
|
|
35
|
-
"@typescript-eslint/no-explicit-any": string;
|
|
36
|
-
"@typescript-eslint/no-floating-promises": string;
|
|
37
|
-
"@typescript-eslint/no-meaningless-void-operator": string;
|
|
38
|
-
"@typescript-eslint/no-require-imports": string;
|
|
39
|
-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": string;
|
|
40
|
-
"@typescript-eslint/no-var-requires": string;
|
|
41
|
-
"@typescript-eslint/prefer-enum-initializers": string;
|
|
42
|
-
"@typescript-eslint/prefer-for-of": string;
|
|
43
|
-
"@typescript-eslint/prefer-includes": string;
|
|
44
|
-
"@typescript-eslint/prefer-literal-enum-member": string;
|
|
45
|
-
"@typescript-eslint/prefer-nullish-coalescing": string;
|
|
46
|
-
"@typescript-eslint/prefer-optional-chain": string;
|
|
47
|
-
"@typescript-eslint/prefer-return-this-type": string;
|
|
48
|
-
"@typescript-eslint/prefer-string-starts-ends-with": string;
|
|
49
|
-
"@typescript-eslint/prefer-ts-expect-error": string;
|
|
50
|
-
"@typescript-eslint/switch-exhaustiveness-check": string;
|
|
51
|
-
"@typescript-eslint/unified-signatures": string;
|
|
52
|
-
"@typescript-eslint/no-throw-literal": string;
|
|
10
|
+
"@typescript-eslint/consistent-type-definitions": string[];
|
|
11
|
+
"@typescript-eslint/naming-convention": string;
|
|
12
|
+
"security/detect-object-injection": string;
|
|
53
13
|
"@typescript-eslint/no-unused-vars": (string | {
|
|
54
|
-
ignoreRestSiblings: boolean;
|
|
55
|
-
varsIgnorePattern: string;
|
|
56
|
-
args: string;
|
|
57
14
|
argsIgnorePattern: string;
|
|
58
15
|
})[];
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
leadingUnderscore?: never;
|
|
74
|
-
} | {
|
|
75
|
-
selector: string;
|
|
76
|
-
modifiers: string[];
|
|
77
|
-
format: string[];
|
|
78
|
-
leadingUnderscore?: never;
|
|
79
|
-
} | {
|
|
80
|
-
selector: string[];
|
|
81
|
-
format: string[];
|
|
82
|
-
leadingUnderscore: string;
|
|
83
|
-
modifiers?: never;
|
|
84
|
-
} | {
|
|
85
|
-
selector: string[];
|
|
86
|
-
format: string[];
|
|
87
|
-
modifiers?: never;
|
|
88
|
-
leadingUnderscore?: never;
|
|
89
|
-
} | {
|
|
90
|
-
selector: string;
|
|
91
|
-
format: null;
|
|
92
|
-
modifiers?: never;
|
|
93
|
-
leadingUnderscore?: never;
|
|
94
|
-
} | {
|
|
95
|
-
selector: string[];
|
|
96
|
-
modifiers: string[];
|
|
97
|
-
leadingUnderscore: string;
|
|
98
|
-
format: null;
|
|
99
|
-
})[];
|
|
100
|
-
"consistent-return": string;
|
|
101
|
-
"default-case-last": string;
|
|
102
|
-
"@typescript-eslint/default-param-last": string;
|
|
103
|
-
"@typescript-eslint/dot-notation": (string | {
|
|
104
|
-
allowKeywords: boolean;
|
|
105
|
-
})[];
|
|
106
|
-
eqeqeq: string[];
|
|
107
|
-
"grouped-accessor-pairs": string;
|
|
108
|
-
"@typescript-eslint/lines-between-class-members": (string | {
|
|
109
|
-
exceptAfterSingleLine: boolean;
|
|
110
|
-
})[];
|
|
16
|
+
"no-return-await": string;
|
|
17
|
+
"@typescript-eslint/return-await": string[];
|
|
18
|
+
"capitalized-comments": (string | {
|
|
19
|
+
ignorePattern: string;
|
|
20
|
+
})[];
|
|
21
|
+
curly: string;
|
|
22
|
+
"class-methods-use-this": string;
|
|
23
|
+
"import/extensions": string;
|
|
24
|
+
"n/no-missing-import": string;
|
|
25
|
+
"n/no-unpublished-import": string;
|
|
26
|
+
"unicorn/prefer-module": string;
|
|
27
|
+
"import/no-extraneous-dependencies": string;
|
|
28
|
+
"import/no-unresolved": string;
|
|
29
|
+
"import/prefer-default-export": string;
|
|
111
30
|
"new-cap": (string | {
|
|
112
31
|
newIsCap: boolean;
|
|
113
32
|
capIsNew: boolean;
|
|
114
33
|
})[];
|
|
115
|
-
"no-
|
|
116
|
-
"no-
|
|
117
|
-
|
|
118
|
-
"no-constructor-return": string;
|
|
119
|
-
"no-eval": string;
|
|
120
|
-
"@typescript-eslint/no-implied-eval": string;
|
|
121
|
-
"no-lone-blocks": string;
|
|
122
|
-
"@typescript-eslint/no-loop-func": string;
|
|
123
|
-
"no-multi-assign": string;
|
|
124
|
-
"no-multi-str": string;
|
|
125
|
-
"no-new": string;
|
|
126
|
-
"no-new-func": string;
|
|
127
|
-
"no-new-object": string;
|
|
128
|
-
"no-new-require": string;
|
|
129
|
-
"no-new-wrappers": string;
|
|
130
|
-
"no-octal-escape": string;
|
|
131
|
-
"no-param-reassign": (string | {
|
|
132
|
-
props: boolean;
|
|
133
|
-
})[];
|
|
134
|
-
"no-restricted-globals": (string | {
|
|
135
|
-
name: string;
|
|
136
|
-
message: string;
|
|
137
|
-
})[];
|
|
138
|
-
"no-proto": string;
|
|
139
|
-
"no-extend-native": string;
|
|
140
|
-
"no-extra-label": string;
|
|
141
|
-
"no-iterator": string;
|
|
142
|
-
"no-label-var": string;
|
|
143
|
-
"no-script-url": string;
|
|
144
|
-
"no-sequences": string;
|
|
145
|
-
"no-restricted-properties": (string | {
|
|
146
|
-
object: string;
|
|
147
|
-
property: string;
|
|
148
|
-
message: string;
|
|
149
|
-
} | {
|
|
150
|
-
property: string;
|
|
34
|
+
"no-only-tests/no-only-tests": string;
|
|
35
|
+
"no-restricted-syntax": (string | {
|
|
36
|
+
selector: string;
|
|
151
37
|
message: string;
|
|
152
|
-
object?: never;
|
|
153
38
|
})[];
|
|
154
|
-
"no-
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"no-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
"@typescript-eslint/no-unused-expressions": string[];
|
|
163
|
-
"no-useless-computed-key": string;
|
|
164
|
-
"no-useless-concat": string;
|
|
165
|
-
"@typescript-eslint/no-useless-constructor": string;
|
|
166
|
-
"no-useless-rename": string[];
|
|
167
|
-
"no-useless-return": string;
|
|
168
|
-
"no-void": string;
|
|
169
|
-
"object-shorthand": (string | {
|
|
170
|
-
avoidQuotes: boolean;
|
|
171
|
-
})[];
|
|
172
|
-
"operator-assignment": string[];
|
|
173
|
-
"prefer-arrow-callback": string[];
|
|
174
|
-
"prefer-destructuring": (string | {
|
|
175
|
-
VariableDeclarator: {
|
|
176
|
-
array: boolean;
|
|
177
|
-
object: boolean;
|
|
178
|
-
};
|
|
179
|
-
})[];
|
|
180
|
-
"prefer-exponentiation-operator": string;
|
|
181
|
-
"prefer-numeric-literals": string;
|
|
182
|
-
"prefer-object-spread": string;
|
|
183
|
-
"prefer-promise-reject-errors": (string | {
|
|
184
|
-
allowEmptyReject: boolean;
|
|
185
|
-
})[];
|
|
186
|
-
"prefer-regex-literals": (string | {
|
|
187
|
-
disallowRedundantWrapping: boolean;
|
|
188
|
-
})[];
|
|
189
|
-
"prefer-template": string;
|
|
190
|
-
"spaced-comment": (string | {
|
|
191
|
-
line: {
|
|
192
|
-
exceptions: string[];
|
|
193
|
-
markers: string[];
|
|
194
|
-
};
|
|
195
|
-
block: {
|
|
196
|
-
exceptions: string[];
|
|
197
|
-
markers: string[];
|
|
198
|
-
balanced: boolean;
|
|
199
|
-
};
|
|
39
|
+
"no-shadow": string;
|
|
40
|
+
"object-shorthand": string[];
|
|
41
|
+
"simple-import-sort/imports": string;
|
|
42
|
+
"simple-import-sort/exports": string;
|
|
43
|
+
"unicorn/no-array-for-each": string;
|
|
44
|
+
"unicorn/no-array-reduce": string;
|
|
45
|
+
"unicorn/prevent-abbreviations": (string | {
|
|
46
|
+
ignore: RegExp[];
|
|
200
47
|
})[];
|
|
201
|
-
strict: string[];
|
|
202
|
-
"symbol-description": string;
|
|
203
|
-
yoda: string[];
|
|
204
48
|
};
|
|
205
|
-
export declare
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}[];
|
|
49
|
+
export declare namespace settings {
|
|
50
|
+
namespace node {
|
|
51
|
+
const version: string;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
211
54
|
//# sourceMappingURL=index.d.ts.map
|
package/src/index.js
CHANGED
|
@@ -1,323 +1,94 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const MESSAGES = {
|
|
3
|
-
isFinite: "Please use Number.isFinite instead.",
|
|
4
|
-
isNaN: "Please use Number.isNaN instead.",
|
|
5
|
-
};
|
|
6
2
|
module.exports = {
|
|
3
|
+
extends: [
|
|
4
|
+
"airbnb-base",
|
|
5
|
+
"plugin:eslint-comments/recommended",
|
|
6
|
+
"plugin:jest/recommended",
|
|
7
|
+
"plugin:jest/style",
|
|
8
|
+
"plugin:import/recommended",
|
|
9
|
+
"plugin:n/recommended",
|
|
10
|
+
"plugin:no-use-extend-native/recommended",
|
|
11
|
+
"plugin:security/recommended",
|
|
12
|
+
"plugin:sonarjs/recommended",
|
|
13
|
+
"plugin:unicorn/recommended",
|
|
14
|
+
"prettier",
|
|
15
|
+
"xo",
|
|
16
|
+
"xo-typescript/space",
|
|
17
|
+
],
|
|
7
18
|
parser: "@typescript-eslint/parser",
|
|
8
19
|
parserOptions: {
|
|
9
20
|
project: ["tsconfig.json"],
|
|
10
21
|
tsconfigRootDir: __dirname,
|
|
11
22
|
},
|
|
12
|
-
plugins: ["
|
|
13
|
-
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
|
|
14
|
-
root: true,
|
|
15
|
-
env: {
|
|
16
|
-
es2022: true,
|
|
17
|
-
node: true,
|
|
18
|
-
jest: true,
|
|
19
|
-
},
|
|
20
|
-
ignorePatterns: [".eslintrc.js"],
|
|
23
|
+
plugins: ["jest", "no-only-tests", "simple-import-sort", "sonarjs"],
|
|
21
24
|
rules: {
|
|
25
|
+
// See https://github.com/microsoft/TypeScript/wiki/Performance#preferring-interfaces-over-intersections
|
|
26
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
|
27
|
+
// Too many false positives
|
|
28
|
+
"@typescript-eslint/naming-convention": "off",
|
|
29
|
+
"security/detect-object-injection": "off",
|
|
30
|
+
// Prefer an escape hatch instead of an outright ban
|
|
31
|
+
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
|
|
32
|
+
// Prefer debugging ease over an extra microtask by requiring `return await`.
|
|
33
|
+
// `no-return-await` states "This can make debugging more difficult."
|
|
34
|
+
"no-return-await": "off",
|
|
35
|
+
"@typescript-eslint/return-await": ["error", "always"],
|
|
36
|
+
// Ignore `sonar-disable`/`sonar-enable` comments
|
|
37
|
+
"capitalized-comments": ["error", "always", { ignorePattern: "sonar" }],
|
|
38
|
+
// Prevent bugs
|
|
39
|
+
curly: "error",
|
|
40
|
+
// Recommends using static fields instead of moving to a function
|
|
41
|
+
"class-methods-use-this": "off",
|
|
42
|
+
// Our libraries don't use ESM
|
|
43
|
+
"import/extensions": "off",
|
|
44
|
+
"n/no-missing-import": "off",
|
|
45
|
+
"n/no-unpublished-import": "off",
|
|
46
|
+
"unicorn/prefer-module": "off",
|
|
47
|
+
// Rely on `"n/no-extraneous-import"` instead
|
|
48
|
+
"import/no-extraneous-dependencies": "off",
|
|
49
|
+
// Doesn't play well with NX/monorepos
|
|
50
|
+
"import/no-unresolved": "off",
|
|
51
|
+
// Prefer named exports
|
|
52
|
+
"import/prefer-default-export": "off",
|
|
53
|
+
// Allow PascalCase for Decorators
|
|
54
|
+
"new-cap": ["warn", { newIsCap: true, capIsNew: false }],
|
|
55
|
+
/* Don't allow `.only` in tests to prevent it from making it
|
|
56
|
+
into `main` and circumventing our tests. */
|
|
22
57
|
"no-only-tests/no-only-tests": "error",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
destructuring: "all",
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
"func-style": [
|
|
30
|
-
"warn",
|
|
31
|
-
"declaration",
|
|
32
|
-
{
|
|
33
|
-
allowArrowFunctions: true,
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
"sort-imports": "off",
|
|
37
|
-
"simple-import-sort/imports": "warn",
|
|
38
|
-
"simple-import-sort/exports": "warn",
|
|
39
|
-
"@typescript-eslint/consistent-indexed-object-style": ["warn", "record"],
|
|
40
|
-
"@typescript-eslint/consistent-type-assertions": [
|
|
41
|
-
"warn",
|
|
42
|
-
{
|
|
43
|
-
assertionStyle: "never",
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
// Enabled by default - you can and should override this in overrides below
|
|
47
|
-
"@typescript-eslint/explicit-module-boundary-types": [
|
|
48
|
-
"warn",
|
|
49
|
-
// We already have 'no-explicit-any' on - no need to enforce it again
|
|
50
|
-
{ allowArgumentsExplicitlyTypedAsAny: true },
|
|
51
|
-
],
|
|
52
|
-
"@typescript-eslint/no-invalid-void-type": "warn",
|
|
53
|
-
"@typescript-eslint/no-explicit-any": "warn",
|
|
54
|
-
"@typescript-eslint/no-floating-promises": "warn",
|
|
55
|
-
"@typescript-eslint/no-meaningless-void-operator": "warn",
|
|
56
|
-
"@typescript-eslint/no-require-imports": "warn",
|
|
57
|
-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
|
|
58
|
-
"@typescript-eslint/no-var-requires": "off",
|
|
59
|
-
"@typescript-eslint/prefer-enum-initializers": "warn",
|
|
60
|
-
"@typescript-eslint/prefer-for-of": "warn",
|
|
61
|
-
"@typescript-eslint/prefer-includes": "warn",
|
|
62
|
-
"@typescript-eslint/prefer-literal-enum-member": "warn",
|
|
63
|
-
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
|
64
|
-
"@typescript-eslint/prefer-optional-chain": "warn",
|
|
65
|
-
"@typescript-eslint/prefer-return-this-type": "error",
|
|
66
|
-
"@typescript-eslint/prefer-string-starts-ends-with": "warn",
|
|
67
|
-
"@typescript-eslint/prefer-ts-expect-error": "warn",
|
|
68
|
-
"@typescript-eslint/switch-exhaustiveness-check": "warn",
|
|
69
|
-
"@typescript-eslint/unified-signatures": "warn",
|
|
70
|
-
"@typescript-eslint/no-throw-literal": "warn",
|
|
71
|
-
"@typescript-eslint/no-unused-vars": [
|
|
72
|
-
"warn",
|
|
73
|
-
{
|
|
74
|
-
ignoreRestSiblings: true,
|
|
75
|
-
varsIgnorePattern: "(^_)",
|
|
76
|
-
args: "all",
|
|
77
|
-
argsIgnorePattern: "(^_)",
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
"array-callback-return": [
|
|
58
|
+
// Adapter from Airbnb's config, but allows ForOfStatement.
|
|
59
|
+
// See https://github.com/airbnb/javascript/blob/0f3ca32323b8d5770de3301036e65511c6d18e00/packages/eslint-config-airbnb-base/rules/style.js#L340-L358
|
|
60
|
+
"no-restricted-syntax": [
|
|
81
61
|
"error",
|
|
82
62
|
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
"no-var": "warn",
|
|
88
|
-
"@typescript-eslint/naming-convention": [
|
|
89
|
-
"warn",
|
|
90
|
-
{
|
|
91
|
-
selector: "default",
|
|
92
|
-
format: ["camelCase"],
|
|
93
|
-
},
|
|
94
|
-
// Ignore destructured variables
|
|
95
|
-
{
|
|
96
|
-
selector: ["variable", "parameter"],
|
|
97
|
-
modifiers: ["destructured"],
|
|
98
|
-
format: null,
|
|
99
|
-
},
|
|
100
|
-
// Additional cases for constants, enums
|
|
101
|
-
{
|
|
102
|
-
selector: "variable",
|
|
103
|
-
modifiers: ["const"],
|
|
104
|
-
format: ["camelCase", "UPPER_CASE", "PascalCase"],
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
selector: "enum",
|
|
108
|
-
format: ["PascalCase", "UPPER_CASE"],
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
selector: ["enumMember", "typeProperty"],
|
|
112
|
-
format: ["camelCase", "PascalCase", "UPPER_CASE", "snake_case"],
|
|
113
|
-
//
|
|
114
|
-
leadingUnderscore: "allow",
|
|
115
|
-
},
|
|
116
|
-
// Classes/interfaces/types
|
|
117
|
-
{
|
|
118
|
-
selector: ["class", "interface", "typeAlias", "typeParameter"],
|
|
119
|
-
format: ["PascalCase"],
|
|
120
|
-
},
|
|
121
|
-
// Ignore object literal props, e.g. in prisma calls
|
|
122
|
-
{
|
|
123
|
-
selector: "objectLiteralProperty",
|
|
124
|
-
format: null,
|
|
63
|
+
selector: "ForInStatement",
|
|
64
|
+
message: "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",
|
|
125
65
|
},
|
|
126
|
-
// Support unused variables
|
|
127
66
|
{
|
|
128
|
-
selector:
|
|
129
|
-
|
|
130
|
-
leadingUnderscore: "allow",
|
|
131
|
-
format: null,
|
|
67
|
+
selector: "LabeledStatement",
|
|
68
|
+
message: "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",
|
|
132
69
|
},
|
|
133
|
-
],
|
|
134
|
-
"consistent-return": "warn",
|
|
135
|
-
"default-case-last": "warn",
|
|
136
|
-
"@typescript-eslint/default-param-last": "error",
|
|
137
|
-
"@typescript-eslint/dot-notation": [
|
|
138
|
-
"warn",
|
|
139
|
-
{
|
|
140
|
-
allowKeywords: true,
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
eqeqeq: ["error", "always"],
|
|
144
|
-
"grouped-accessor-pairs": "warn",
|
|
145
|
-
"@typescript-eslint/lines-between-class-members": [
|
|
146
|
-
"warn",
|
|
147
|
-
"always",
|
|
148
70
|
{
|
|
149
|
-
|
|
71
|
+
selector: "WithStatement",
|
|
72
|
+
message: "`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",
|
|
150
73
|
},
|
|
151
74
|
],
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"no-
|
|
162
|
-
"no-
|
|
163
|
-
|
|
164
|
-
"
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
"no-multi-assign": "warn",
|
|
168
|
-
"no-multi-str": "warn",
|
|
169
|
-
"no-new": "warn",
|
|
170
|
-
"no-new-func": "error",
|
|
171
|
-
"no-new-object": "error",
|
|
172
|
-
"no-new-require": "error",
|
|
173
|
-
"no-new-wrappers": "error",
|
|
174
|
-
"no-octal-escape": "error",
|
|
175
|
-
"no-param-reassign": [
|
|
176
|
-
"warn",
|
|
177
|
-
{
|
|
178
|
-
props: false,
|
|
179
|
-
},
|
|
180
|
-
],
|
|
181
|
-
"no-restricted-globals": [
|
|
182
|
-
"warn",
|
|
183
|
-
{
|
|
184
|
-
name: "isFinite",
|
|
185
|
-
message: "Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
name: "isNaN",
|
|
189
|
-
message: "Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",
|
|
190
|
-
},
|
|
191
|
-
],
|
|
192
|
-
"no-proto": "warn",
|
|
193
|
-
"no-extend-native": "warn",
|
|
194
|
-
"no-extra-label": "warn",
|
|
195
|
-
"no-iterator": "warn",
|
|
196
|
-
"no-label-var": "warn",
|
|
197
|
-
"no-script-url": "warn",
|
|
198
|
-
"no-sequences": "warn",
|
|
199
|
-
"no-restricted-properties": [
|
|
200
|
-
"warn",
|
|
201
|
-
{
|
|
202
|
-
object: "global",
|
|
203
|
-
property: "isFinite",
|
|
204
|
-
message: MESSAGES.isFinite,
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
object: "self",
|
|
208
|
-
property: "isFinite",
|
|
209
|
-
message: MESSAGES.isFinite,
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
object: "window",
|
|
213
|
-
property: "isFinite",
|
|
214
|
-
message: MESSAGES.isFinite,
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
object: "global",
|
|
218
|
-
property: "isNaN",
|
|
219
|
-
message: MESSAGES.isNaN,
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
object: "self",
|
|
223
|
-
property: "isNaN",
|
|
224
|
-
message: MESSAGES.isNaN,
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
object: "window",
|
|
228
|
-
property: "isNaN",
|
|
229
|
-
message: MESSAGES.isNaN,
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
property: "__defineGetter__",
|
|
233
|
-
message: "Please use Object.defineProperty instead.",
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
property: "__defineSetter__",
|
|
237
|
-
message: "Please use Object.defineProperty instead.",
|
|
238
|
-
},
|
|
239
|
-
],
|
|
240
|
-
"no-self-compare": "error",
|
|
241
|
-
"@typescript-eslint/no-shadow": ["warn"],
|
|
242
|
-
"no-template-curly-in-string": "error",
|
|
243
|
-
"no-undef-init": "warn",
|
|
244
|
-
"no-unneeded-ternary": [
|
|
245
|
-
"warn",
|
|
246
|
-
{
|
|
247
|
-
defaultAssignment: false,
|
|
248
|
-
},
|
|
249
|
-
],
|
|
250
|
-
"no-unreachable-loop": ["warn"],
|
|
251
|
-
"@typescript-eslint/no-unused-expressions": ["warn"],
|
|
252
|
-
"no-useless-computed-key": "warn",
|
|
253
|
-
"no-useless-concat": "warn",
|
|
254
|
-
"@typescript-eslint/no-useless-constructor": "warn",
|
|
255
|
-
"no-useless-rename": ["warn"],
|
|
256
|
-
"no-useless-return": "warn",
|
|
257
|
-
"no-void": "off",
|
|
258
|
-
"object-shorthand": [
|
|
259
|
-
"warn",
|
|
260
|
-
"always",
|
|
261
|
-
{
|
|
262
|
-
avoidQuotes: true,
|
|
263
|
-
},
|
|
264
|
-
],
|
|
265
|
-
"operator-assignment": ["warn", "always"],
|
|
266
|
-
"prefer-arrow-callback": ["warn"],
|
|
267
|
-
"prefer-destructuring": [
|
|
268
|
-
"warn",
|
|
269
|
-
{
|
|
270
|
-
VariableDeclarator: {
|
|
271
|
-
array: false,
|
|
272
|
-
object: true,
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
],
|
|
276
|
-
"prefer-exponentiation-operator": "warn",
|
|
277
|
-
"prefer-numeric-literals": "warn",
|
|
278
|
-
"prefer-object-spread": "error",
|
|
279
|
-
"prefer-promise-reject-errors": [
|
|
280
|
-
"warn",
|
|
281
|
-
{
|
|
282
|
-
allowEmptyReject: true,
|
|
283
|
-
},
|
|
284
|
-
],
|
|
285
|
-
"prefer-regex-literals": [
|
|
286
|
-
"warn",
|
|
287
|
-
{
|
|
288
|
-
disallowRedundantWrapping: true,
|
|
289
|
-
},
|
|
290
|
-
],
|
|
291
|
-
"prefer-template": "warn",
|
|
292
|
-
"spaced-comment": [
|
|
293
|
-
"warn",
|
|
294
|
-
"always",
|
|
295
|
-
{
|
|
296
|
-
line: {
|
|
297
|
-
exceptions: ["-", "+"],
|
|
298
|
-
markers: ["=", "!", "/"],
|
|
299
|
-
},
|
|
300
|
-
block: {
|
|
301
|
-
exceptions: ["-", "+"],
|
|
302
|
-
markers: ["=", "!", ":", "::"],
|
|
303
|
-
balanced: true,
|
|
304
|
-
},
|
|
305
|
-
},
|
|
75
|
+
// False positive on `enum`s
|
|
76
|
+
"no-shadow": "off",
|
|
77
|
+
/* Only enable for properties. Favor arrow functions, they don’t have a `this` reference,
|
|
78
|
+
preventing accidental usage. */
|
|
79
|
+
"object-shorthand": ["error", "properties"],
|
|
80
|
+
// Sort imports and exports
|
|
81
|
+
"simple-import-sort/imports": "warn",
|
|
82
|
+
"simple-import-sort/exports": "warn",
|
|
83
|
+
// "Better readability" is subjective
|
|
84
|
+
"unicorn/no-array-for-each": "off",
|
|
85
|
+
"unicorn/no-array-reduce": "off",
|
|
86
|
+
// Allow common, well understood abbreviations
|
|
87
|
+
"unicorn/prevent-abbreviations": [
|
|
88
|
+
"error",
|
|
89
|
+
{ ignore: [/config/i, /params/i, /props/i, /ref/i] },
|
|
306
90
|
],
|
|
307
|
-
strict: ["warn", "never"],
|
|
308
|
-
"symbol-description": "warn",
|
|
309
|
-
yoda: ["warn"],
|
|
310
91
|
},
|
|
311
|
-
|
|
312
|
-
{
|
|
313
|
-
// Prisma calls with relations can result in complex return types, which
|
|
314
|
-
// may be cumbersome to define explicitly. This override allows type
|
|
315
|
-
// inference in repository files that interact with Prisma.
|
|
316
|
-
files: ["*.repository.ts"],
|
|
317
|
-
rules: {
|
|
318
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
319
|
-
},
|
|
320
|
-
},
|
|
321
|
-
],
|
|
92
|
+
settings: { node: { version: ">=18.15.0" } },
|
|
322
93
|
};
|
|
323
94
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/eslint-config/src/index.js"],"names":[],"mappings":";AAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/eslint-config/src/index.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,OAAO,EAAE;QACP,aAAa;QACb,oCAAoC;QACpC,yBAAyB;QACzB,mBAAmB;QACnB,2BAA2B;QAC3B,sBAAsB;QACtB,yCAAyC;QACzC,6BAA6B;QAC7B,4BAA4B;QAC5B,4BAA4B;QAC5B,UAAU;QACV,IAAI;QACJ,qBAAqB;KACtB;IACD,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,OAAO,EAAE,CAAC,eAAe,CAAC;QAC1B,eAAe,EAAE,SAAS;KAC3B;IACD,OAAO,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,oBAAoB,EAAE,SAAS,CAAC;IACnE,KAAK,EAAE;QACL,wGAAwG;QACxG,gDAAgD,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;QAExE,2BAA2B;QAC3B,sCAAsC,EAAE,KAAK;QAC7C,kCAAkC,EAAE,KAAK;QAEzC,oDAAoD;QACpD,mCAAmC,EAAE,CAAC,MAAM,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;QAE1E,6EAA6E;QAC7E,qEAAqE;QACrE,iBAAiB,EAAE,KAAK;QACxB,iCAAiC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;QAEtD,iDAAiD;QACjD,sBAAsB,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC;QAEvE,eAAe;QACf,KAAK,EAAE,OAAO;QAEd,iEAAiE;QACjE,wBAAwB,EAAE,KAAK;QAE/B,8BAA8B;QAC9B,mBAAmB,EAAE,KAAK;QAC1B,qBAAqB,EAAE,KAAK;QAC5B,yBAAyB,EAAE,KAAK;QAChC,uBAAuB,EAAE,KAAK;QAE9B,6CAA6C;QAC7C,mCAAmC,EAAE,KAAK;QAE1C,sCAAsC;QACtC,sBAAsB,EAAE,KAAK;QAE7B,uBAAuB;QACvB,8BAA8B,EAAE,KAAK;QAErC,kCAAkC;QAClC,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAExD;sDAC8C;QAC9C,6BAA6B,EAAE,OAAO;QAEtC,2DAA2D;QAC3D,qJAAqJ;QACrJ,sBAAsB,EAAE;YACtB,OAAO;YACP;gBACE,QAAQ,EAAE,gBAAgB;gBAC1B,OAAO,EACL,wKAAwK;aAC3K;YACD;gBACE,QAAQ,EAAE,kBAAkB;gBAC5B,OAAO,EACL,iGAAiG;aACpG;YACD;gBACE,QAAQ,EAAE,eAAe;gBACzB,OAAO,EACL,+FAA+F;aAClG;SACF;QAED,4BAA4B;QAC5B,WAAW,EAAE,KAAK;QAElB;0CACkC;QAClC,kBAAkB,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC;QAE3C,2BAA2B;QAC3B,4BAA4B,EAAE,MAAM;QACpC,4BAA4B,EAAE,MAAM;QAEpC,qCAAqC;QACrC,2BAA2B,EAAE,KAAK;QAClC,yBAAyB,EAAE,KAAK;QAEhC,8CAA8C;QAC9C,+BAA+B,EAAE;YAC/B,OAAO;YACP,EAAE,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE;SACrD;KACF;IACD,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE;CAC7C,CAAC"}
|