eslint-config-deepcrawl 13.12.0 → 14.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.
Files changed (3) hide show
  1. package/README.md +6 -15
  2. package/index.js +235 -326
  3. package/package.json +28 -17
package/README.md CHANGED
@@ -9,27 +9,17 @@ Add `eslint-config-deepcrawl` and its peer dependencies to your `package.json`:
9
9
  ```shell
10
10
  yarn add --dev \
11
11
  eslint-config-deepcrawl \
12
- eslint@^8.57.0
12
+ eslint@^9.12.0
13
13
  ```
14
14
 
15
15
  ## Usage
16
16
 
17
- Update your `.eslintrc` configuration:
17
+ Update your `eslint.config.mjs` file:
18
18
 
19
- ```json
20
- {
21
- "extends": ["deepcrawl"]
22
- }
23
- ```
24
-
25
- If you are using tsconfig paths, you also need to let `eslint-plugin-import` know, which imports should it consider internal, for example:
19
+ ```js
20
+ import eslintConfigDeepcrawl from "eslint-config-deepcrawl";
26
21
 
27
- ```json
28
- {
29
- "settings": {
30
- "import/internal-regex": "^@(src|test)/"
31
- }
32
- }
22
+ export default [...eslintConfigDeepcrawl];
33
23
  ```
34
24
 
35
25
  ## Recommendations
@@ -58,6 +48,7 @@ Apart from ESLint, it is recommended to use the following Prettier configuration
58
48
  "arrowParens": "avoid",
59
49
  "bracketSpacing": true,
60
50
  "endOfLine": "lf",
51
+ "plugins": ["prettier-plugin-packagejson"],
61
52
  "printWidth": 120,
62
53
  "quoteProps": "as-needed",
63
54
  "semi": true,
package/index.js CHANGED
@@ -1,332 +1,241 @@
1
- module.exports = {
2
- extends: [
3
- "eslint:recommended",
4
- "plugin:@typescript-eslint/recommended-type-checked",
5
- "plugin:import/recommended",
6
- "plugin:import/typescript",
7
- "plugin:jest/recommended",
8
- "plugin:n/recommended",
9
- "plugin:promise/recommended",
10
- "eslint-config-prettier",
11
- "prettier",
12
- ],
13
- parser: "@typescript-eslint/parser",
14
- plugins: [
15
- "@typescript-eslint",
16
- "array-func",
17
- "no-loops",
18
- "jest",
19
- "json-format",
20
- "promise",
21
- "sonarjs",
22
- ],
23
- reportUnusedDisableDirectives: true,
24
- rules: {
25
- "@typescript-eslint/array-type": [
26
- "error",
27
- {
28
- default: "array-simple",
29
- },
30
- ],
31
- "@typescript-eslint/consistent-type-assertions": [
32
- "error",
33
- {
34
- assertionStyle: "angle-bracket",
35
- objectLiteralTypeAssertions: "allow",
36
- },
37
- ],
38
- "@typescript-eslint/consistent-type-definitions": ["error", "interface"],
39
- "@typescript-eslint/explicit-function-return-type": [
40
- "error",
41
- {
42
- allowExpressions: true,
43
- allowTypedFunctionExpressions: true,
44
- },
45
- ],
46
- "@typescript-eslint/explicit-member-accessibility": [
47
- "error",
48
- {
49
- accessibility: "explicit",
50
- overrides: {
51
- constructors: "no-public",
1
+ import eslintJs from "@eslint/js";
2
+ import eslintConfigPrettier from "eslint-config-prettier";
3
+ import arrayFuncPlugin from "eslint-plugin-array-func";
4
+ import importPlugin from "eslint-plugin-import";
5
+ import jestPlugin from "eslint-plugin-jest";
6
+ import noLoopsPlugin from "eslint-plugin-no-loops";
7
+ import nodePlugin from "eslint-plugin-n";
8
+ import packageJsonPluginConfig from "eslint-plugin-package-json/configs/recommended";
9
+ import promisePlugin from "eslint-plugin-promise";
10
+ import sonarjsPlugin from "eslint-plugin-sonarjs";
11
+ import typescriptEslint from "typescript-eslint";
12
+
13
+ export default [
14
+ eslintJs.configs.recommended,
15
+ ...typescriptEslint.config({
16
+ extends: [...typescriptEslint.configs.recommendedTypeChecked],
17
+ files: ["**/*.{ts,tsx}"],
18
+ languageOptions: {
19
+ parserOptions: {
20
+ projectService: true,
21
+ tsconfigRootDir: import.meta.name,
22
+ },
23
+ },
24
+ }),
25
+ {
26
+ files: ["**/*.{cjs,js,jsx,mjs}"],
27
+ ...typescriptEslint.configs.disableTypeChecked,
28
+ },
29
+ importPlugin.flatConfigs.recommended,
30
+ importPlugin.flatConfigs.typescript,
31
+ jestPlugin.configs["flat/recommended"],
32
+ nodePlugin.configs["flat/recommended"],
33
+ {
34
+ ...packageJsonPluginConfig,
35
+ rules: {
36
+ ...packageJsonPluginConfig.rules,
37
+ // https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/499
38
+ "package-json/sort-collections": ["error", ["devDependencies", "dependencies", "peerDependencies", "config"]],
39
+ },
40
+ },
41
+ promisePlugin.configs["flat/recommended"],
42
+ eslintConfigPrettier,
43
+ {
44
+ linterOptions: { reportUnusedDisableDirectives: true },
45
+ },
46
+ {
47
+ plugins: { "array-func": arrayFuncPlugin },
48
+ rules: { "array-func/avoid-reverse": "error" },
49
+ },
50
+ {
51
+ plugins: { "no-loops": noLoopsPlugin },
52
+ rules: { "no-loops/no-loops": "error" },
53
+ },
54
+ {
55
+ plugins: { sonarjs: sonarjsPlugin },
56
+ rules: {
57
+ "sonarjs/cognitive-complexity": ["error", 15],
58
+ "sonarjs/max-switch-cases": "error",
59
+ "sonarjs/no-all-duplicated-branches": "error",
60
+ "sonarjs/no-collapsible-if": "error",
61
+ "sonarjs/no-collection-size-mischeck": "error",
62
+ "sonarjs/no-duplicate-string": "warn",
63
+ "sonarjs/no-duplicated-branches": "error",
64
+ "sonarjs/no-element-overwrite": "error",
65
+ "sonarjs/no-identical-conditions": "error",
66
+ "sonarjs/no-identical-expressions": "error",
67
+ "sonarjs/no-identical-functions": "error",
68
+ "sonarjs/no-inverted-boolean-check": "error",
69
+ "sonarjs/no-one-iteration-loop": "error",
70
+ "sonarjs/no-redundant-boolean": "error",
71
+ "sonarjs/no-redundant-jump": "error",
72
+ "sonarjs/no-same-line-conditional": "error",
73
+ "sonarjs/no-small-switch": "error",
74
+ "sonarjs/no-unused-collection": "error",
75
+ "sonarjs/no-use-of-empty-return-value": "error",
76
+ "sonarjs/no-useless-catch": "error",
77
+ "sonarjs/prefer-immediate-return": "error",
78
+ "sonarjs/prefer-while": "error",
79
+ },
80
+ },
81
+ {
82
+ files: ["**/*.{ts,tsx}"],
83
+ rules: {
84
+ "@typescript-eslint/array-type": ["error", { default: "array-simple" }],
85
+ "@typescript-eslint/consistent-type-assertions": [
86
+ "error",
87
+ { assertionStyle: "angle-bracket", objectLiteralTypeAssertions: "allow" },
88
+ ],
89
+ "@typescript-eslint/consistent-type-definitions": ["error", "interface"],
90
+ "@typescript-eslint/explicit-function-return-type": [
91
+ "error",
92
+ { allowExpressions: true, allowTypedFunctionExpressions: true },
93
+ ],
94
+ "@typescript-eslint/explicit-member-accessibility": [
95
+ "error",
96
+ { accessibility: "explicit", overrides: { constructors: "no-public" } },
97
+ ],
98
+ "@typescript-eslint/explicit-module-boundary-types": "off",
99
+ "@typescript-eslint/naming-convention": [
100
+ "warn",
101
+ { selector: "default", format: ["camelCase"], leadingUnderscore: "allow", trailingUnderscore: "allow" },
102
+ { selector: "import", format: ["camelCase", "PascalCase", "snake_case"] },
103
+ {
104
+ selector: "variable",
105
+ format: ["camelCase", "PascalCase", "UPPER_CASE"],
106
+ leadingUnderscore: "allow",
107
+ trailingUnderscore: "allow",
52
108
  },
53
- },
54
- ],
55
- "@typescript-eslint/explicit-module-boundary-types": "off",
56
- "@typescript-eslint/naming-convention": [
57
- "warn",
58
- {
59
- selector: "default",
60
- format: ["camelCase"],
61
- leadingUnderscore: "allow",
62
- trailingUnderscore: "allow",
63
- },
64
- {
65
- selector: "import",
66
- format: ["camelCase", "PascalCase", "snake_case"],
67
- },
68
- {
69
- selector: "variable",
70
- format: ["camelCase", "PascalCase", "UPPER_CASE"],
71
- leadingUnderscore: "allow",
72
- trailingUnderscore: "allow",
73
- },
74
- {
75
- "selector": "variable",
76
- "types": ["boolean"],
77
- "format": ["PascalCase"],
78
- "prefix": ["are", "can", "did", "does", "do", "has", "is", "not", "should", "was", "were", "will", "with"]
79
- },
80
- {
81
- selector: "function",
82
- format: ["camelCase", "PascalCase"],
83
- },
84
- {
85
- selector: "property",
86
- format: ["camelCase", "PascalCase", "UPPER_CASE"],
87
- leadingUnderscore: "allow",
88
- trailingUnderscore: "allow",
89
- },
90
- {
91
- selector: "property",
92
- format: null,
93
- filter: {
94
- regex: "[- :]",
95
- match: true,
109
+ {
110
+ selector: "variable",
111
+ types: ["boolean"],
112
+ format: ["PascalCase"],
113
+ prefix: ["are", "can", "did", "does", "do", "has", "is", "not", "should", "was", "were", "will", "with"],
96
114
  },
97
- },
98
- {
99
- selector: "enumMember",
100
- format: ["camelCase", "PascalCase"],
101
- },
102
- {
103
- selector: "typeLike",
104
- format: ["PascalCase"],
105
- },
106
- {
107
- selector: "interface",
108
- format: ["PascalCase"],
109
- prefix: ["I"]
110
- },
111
- {
112
- selector: "typeParameter",
113
- format: ["PascalCase"],
114
- prefix: ["T"]
115
- },
116
- ],
117
- "@typescript-eslint/no-base-to-string": "off",
118
- "@typescript-eslint/no-duplicate-enum-values": "off",
119
- "@typescript-eslint/no-empty-function": [
120
- "error",
121
- {
122
- allow: ["protected-constructors", "private-constructors"],
123
- },
124
- ],
125
- "@typescript-eslint/no-explicit-any": [
126
- "error",
127
- {
128
- fixToUnknown: true,
129
- ignoreRestArgs: true,
130
- },
131
- ],
132
- "@typescript-eslint/no-inferrable-types": [
133
- "error",
134
- {
135
- ignoreProperties: true,
136
- },
137
- ],
138
- "@typescript-eslint/no-magic-numbers": [
139
- "off",
140
- {
141
- ignoreNumericLiteralTypes: true,
142
- },
143
- ],
144
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
145
- "@typescript-eslint/no-non-null-assertion": "error",
146
- "@typescript-eslint/no-restricted-types": [
147
- "error",
148
- {
149
- types: {
150
- String: {
151
- message: "Use string instead",
152
- fixWith: "string",
153
- },
154
- Boolean: {
155
- message: "Use boolean instead",
156
- fixWith: "boolean",
157
- },
158
- Number: {
159
- message: "Use number instead",
160
- fixWith: "number",
161
- },
162
- Symbol: {
163
- message: "Use symbol instead",
164
- fixWith: "symbol",
165
- },
166
- BigInt: {
167
- message: "Use bigint instead",
168
- fixWith: "bigint",
169
- },
170
- // object typing
171
- Object: {
172
- message: [
173
- 'The `Object` type actually means "any non-nullish value", so it is marginally better than `unknown`.',
174
- '- If you want a type meaning "any object", you probably want `Record<string, unknown>` instead.',
175
- '- If you want a type meaning "any value", you probably want `unknown` instead.',
176
- ].join('\n'),
177
- },
178
- object: {
179
- message: [
180
- 'The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).',
181
- 'Consider using `Record<string, unknown>` instead, as it allows you to more easily inspect and use the keys.',
182
- ].join('\n'),
183
- },
115
+ { selector: "function", format: ["camelCase", "PascalCase"] },
116
+ {
117
+ selector: "property",
118
+ format: ["camelCase", "PascalCase", "UPPER_CASE"],
119
+ leadingUnderscore: "allow",
120
+ trailingUnderscore: "allow",
184
121
  },
185
- },
186
- ],
187
- "@typescript-eslint/no-this-alias": [
188
- "error",
189
- {
190
- allowDestructuring: true,
191
- },
192
- ],
193
- "@typescript-eslint/no-unnecessary-type-arguments": "error",
194
- "@typescript-eslint/no-unsafe-argument": "off",
195
- "@typescript-eslint/no-unsafe-assignment": "off",
196
- "@typescript-eslint/no-unsafe-call": "off",
197
- "@typescript-eslint/no-unsafe-enum-comparison": "off",
198
- "@typescript-eslint/no-unsafe-function-type": "off",
199
- "@typescript-eslint/no-unsafe-member-access": "off",
200
- "@typescript-eslint/no-unsafe-return": "off",
201
- "@typescript-eslint/no-unused-vars": [
202
- "error",
203
- {
204
- argsIgnorePattern: "^_",
205
- destructuredArrayIgnorePattern: "^_",
206
- },
207
- ],
208
- "@typescript-eslint/no-useless-constructor": "error",
209
- "@typescript-eslint/prefer-includes": "error",
210
- "@typescript-eslint/prefer-regexp-exec": "error",
211
- "@typescript-eslint/require-array-sort-compare": "error",
212
- "@typescript-eslint/restrict-template-expressions": "off",
213
- "@typescript-eslint/return-await": "error",
214
- "@typescript-eslint/sort-type-constituents": "error",
215
- "@typescript-eslint/unified-signatures": "error",
216
- "array-func/avoid-reverse": "error",
217
- "import/default": "off",
218
- "import/named": "off",
219
- "import/namespace": "off",
220
- "import/newline-after-import": "error",
221
- "import/no-default-export": "error",
222
- "import/no-named-as-default": "off",
223
- "import/no-named-as-default-member": "off",
224
- "import/no-relative-packages": "error",
225
- "import/no-unresolved": "off",
226
- "import/order": [
227
- "error",
228
- {
229
- alphabetize: {
230
- order: "asc",
231
- caseInsensitive: true,
122
+ { selector: "property", format: null, filter: { regex: "[- :]", match: true } },
123
+ { selector: "enumMember", format: ["camelCase", "PascalCase"] },
124
+ { selector: "typeLike", format: ["PascalCase"] },
125
+ { selector: "interface", format: ["PascalCase"], prefix: ["I"] },
126
+ { selector: "typeParameter", format: ["PascalCase"], prefix: ["T"] },
127
+ ],
128
+ "@typescript-eslint/no-base-to-string": "off",
129
+ "@typescript-eslint/no-duplicate-enum-values": "off",
130
+ "@typescript-eslint/no-empty-function": ["error", { allow: ["protected-constructors", "private-constructors"] }],
131
+ "@typescript-eslint/no-explicit-any": ["error", { fixToUnknown: true, ignoreRestArgs: true }],
132
+ "@typescript-eslint/no-inferrable-types": ["error", { ignoreProperties: true }],
133
+ "@typescript-eslint/no-magic-numbers": ["off", { ignoreNumericLiteralTypes: true }],
134
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
135
+ "@typescript-eslint/no-non-null-assertion": "error",
136
+ "@typescript-eslint/no-restricted-types": [
137
+ "error",
138
+ {
139
+ types: {
140
+ String: { message: "Use string instead", fixWith: "string" },
141
+ Boolean: { message: "Use boolean instead", fixWith: "boolean" },
142
+ Number: { message: "Use number instead", fixWith: "number" },
143
+ Symbol: { message: "Use symbol instead", fixWith: "symbol" },
144
+ BigInt: { message: "Use bigint instead", fixWith: "bigint" },
145
+ // object typing
146
+ Object: {
147
+ message: [
148
+ 'The `Object` type actually means "any non-nullish value", so it is marginally better than `unknown`.',
149
+ '- If you want a type meaning "any object", you probably want `Record<string, unknown>` instead.',
150
+ '- If you want a type meaning "any value", you probably want `unknown` instead.',
151
+ ].join("\n"),
152
+ },
153
+ object: {
154
+ message: [
155
+ "The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).",
156
+ "Consider using `Record<string, unknown>` instead, as it allows you to more easily inspect and use the keys.",
157
+ ].join("\n"),
158
+ },
159
+ },
232
160
  },
233
- "newlines-between": "always",
234
- groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
235
- },
236
- ],
237
- "jest/expect-expect": "error",
238
- "jest/padding-around-after-all-blocks": "error",
239
- "jest/padding-around-after-each-blocks": "error",
240
- "jest/padding-around-before-all-blocks": "error",
241
- "jest/padding-around-before-each-blocks": "error",
242
- "jest/padding-around-describe-blocks": "error",
243
- "jest/padding-around-test-blocks": "error",
244
- "jest/prefer-expect-resolves": "error",
245
- "jest/prefer-to-be": "error",
246
- "no-loops/no-loops": "error",
247
- "n/no-missing-import": "off",
248
- "n/no-unsupported-features/node-builtins": [
249
- "error",
250
- {
251
- ignores: ["fetch", "Response", "Request"],
252
- },
253
- ],
254
- "n/no-unsupported-features/es-syntax": [
255
- "error",
256
- {
257
- ignores: ["modules"],
258
- },
259
- ],
260
- "promise/prefer-await-to-then": "error",
261
- "sonarjs/cognitive-complexity": ["error", 8],
262
- "sonarjs/max-switch-cases": "error",
263
- "sonarjs/no-all-duplicated-branches": "error",
264
- "sonarjs/no-collapsible-if": "error",
265
- "sonarjs/no-collection-size-mischeck": "error",
266
- "sonarjs/no-duplicate-string": "warn",
267
- "sonarjs/no-duplicated-branches": "error",
268
- "sonarjs/no-element-overwrite": "error",
269
- "sonarjs/no-identical-conditions": "error",
270
- "sonarjs/no-identical-expressions": "error",
271
- "sonarjs/no-identical-functions": "error",
272
- "sonarjs/no-inverted-boolean-check": "error",
273
- "sonarjs/no-one-iteration-loop": "error",
274
- "sonarjs/no-redundant-boolean": "error",
275
- "sonarjs/no-redundant-jump": "error",
276
- "sonarjs/no-same-line-conditional": "error",
277
- "sonarjs/no-small-switch": "error",
278
- "sonarjs/no-unused-collection": "error",
279
- "sonarjs/no-use-of-empty-return-value": "error",
280
- "sonarjs/no-useless-catch": "error",
281
- "sonarjs/prefer-immediate-return": "error",
282
- "sonarjs/prefer-while": "error",
283
- "complexity": ["error", 10],
284
- "default-case-last": "error",
285
- "max-classes-per-file": ["error", 1],
286
- "max-len": [
287
- "error",
288
- {
289
- code: 120,
290
- ignoreComments: true,
291
- ignorePattern: "^(export|import)*",
292
- ignoreTemplateLiterals: true,
293
- }
294
- ],
295
- "max-lines-per-function": [
296
- "warn",
297
- {
298
- max: 20,
299
- skipBlankLines: true,
300
- skipComments: true,
301
- IIFEs: true
302
- },
303
- ],
304
- "max-params": ["error", 7],
305
- "max-statements-per-line": [
306
- "error",
307
- {
308
- max: 1,
309
- },
310
- ],
311
- "no-console": "error",
312
- "no-else-return": "error",
313
- "no-multi-str": "error",
314
- "no-restricted-properties": [
315
- "error",
316
- {
317
- object: "Object",
318
- property: "assign",
319
- message: "Object.assign allows getting around type checking. Consider another solution.",
320
- }
321
- ],
322
- "no-self-assign": "error",
323
- "object-shorthand": "error",
324
- "prefer-template": "error",
325
- "spaced-comment": "error",
161
+ ],
162
+ "@typescript-eslint/no-this-alias": ["error", { allowDestructuring: true }],
163
+ "@typescript-eslint/no-unnecessary-type-arguments": "error",
164
+ "@typescript-eslint/no-unsafe-argument": "off",
165
+ "@typescript-eslint/no-unsafe-assignment": "off",
166
+ "@typescript-eslint/no-unsafe-call": "off",
167
+ "@typescript-eslint/no-unsafe-enum-comparison": "off",
168
+ "@typescript-eslint/no-unsafe-function-type": "off",
169
+ "@typescript-eslint/no-unsafe-member-access": "off",
170
+ "@typescript-eslint/no-unsafe-return": "off",
171
+ "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", destructuredArrayIgnorePattern: "^_" }],
172
+ "@typescript-eslint/no-useless-constructor": "error",
173
+ "@typescript-eslint/prefer-includes": "error",
174
+ "@typescript-eslint/prefer-regexp-exec": "error",
175
+ "@typescript-eslint/require-array-sort-compare": "error",
176
+ "@typescript-eslint/restrict-template-expressions": "off",
177
+ "@typescript-eslint/return-await": "error",
178
+ "@typescript-eslint/sort-type-constituents": "error",
179
+ "@typescript-eslint/unified-signatures": "error",
180
+ },
326
181
  },
327
- settings: {
328
- "json/sort-package-json": "standard",
329
- "json/ignore-files": [],
330
- "json/json-with-comments-files": [],
182
+ {
183
+ rules: {
184
+ complexity: ["error", 15],
185
+ "default-case-last": "error",
186
+ "import/default": "off",
187
+ "import/named": "off",
188
+ "import/namespace": "off",
189
+ "import/newline-after-import": "error",
190
+ "import/no-default-export": "error",
191
+ "import/no-named-as-default": "off",
192
+ "import/no-named-as-default-member": "off",
193
+ "import/no-relative-packages": "error",
194
+ "import/no-unresolved": "off",
195
+ "import/order": [
196
+ "error",
197
+ {
198
+ alphabetize: { order: "asc", caseInsensitive: true },
199
+ "newlines-between": "always",
200
+ groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
201
+ },
202
+ ],
203
+ "jest/expect-expect": "error",
204
+ "jest/padding-around-after-all-blocks": "error",
205
+ "jest/padding-around-after-each-blocks": "error",
206
+ "jest/padding-around-before-all-blocks": "error",
207
+ "jest/padding-around-before-each-blocks": "error",
208
+ "jest/padding-around-describe-blocks": "error",
209
+ "jest/padding-around-test-blocks": "error",
210
+ "jest/prefer-expect-resolves": "error",
211
+ "jest/prefer-to-be": "error",
212
+ "max-classes-per-file": ["error", 1],
213
+ "max-len": [
214
+ "error",
215
+ { code: 120, ignoreComments: true, ignorePattern: "^(export|import)*", ignoreTemplateLiterals: true },
216
+ ],
217
+ "max-lines-per-function": ["warn", { max: 20, skipBlankLines: true, skipComments: true, IIFEs: true }],
218
+ "max-params": ["error", 7],
219
+ "max-statements-per-line": ["error", { max: 1 }],
220
+ "n/no-missing-import": "off",
221
+ "n/no-unsupported-features/node-builtins": ["error", { ignores: ["fetch", "navigator", "Response", "Request"] }],
222
+ "n/no-unsupported-features/es-syntax": ["error", { ignores: ["modules"] }],
223
+ "no-console": "error",
224
+ "no-else-return": "error",
225
+ "no-multi-str": "error",
226
+ "no-restricted-properties": [
227
+ "error",
228
+ {
229
+ object: "Object",
230
+ property: "assign",
231
+ message: "Object.assign allows getting around type checking. Consider another solution.",
232
+ },
233
+ ],
234
+ "no-self-assign": "error",
235
+ "object-shorthand": "error",
236
+ "prefer-template": "error",
237
+ "promise/prefer-await-to-then": "error",
238
+ "spaced-comment": "error",
239
+ },
331
240
  },
332
- };
241
+ ];
package/package.json CHANGED
@@ -1,40 +1,51 @@
1
1
  {
2
2
  "name": "eslint-config-deepcrawl",
3
- "version": "13.12.0",
4
- "description": "ESLint rules recommended by DeepCrawl.",
3
+ "version": "14.0.0",
4
+ "description": "ESLint rules recommended by Lumar (formerly DeepCrawl).",
5
5
  "homepage": "https://github.com/deepcrawl/eslint-config",
6
6
  "bugs": {
7
7
  "url": "https://github.com/deepcrawl/eslint-config/issues"
8
8
  },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "ssh://git@github.com/deepcrawl/eslint-config.git"
12
+ },
9
13
  "license": "MIT",
10
14
  "author": "DeepCrawl",
15
+ "type": "module",
11
16
  "main": "index.js",
12
17
  "files": [
13
18
  "index.js"
14
19
  ],
15
- "repository": {
16
- "type": "git",
17
- "url": "ssh://git@github.com/deepcrawl/eslint-config.git"
18
- },
19
- "publishConfig": {
20
- "registry": "https://registry.npmjs.org/"
20
+ "scripts": {
21
+ "prettier:check": "prettier --list-different .",
22
+ "prettier:fix": "prettier --write ."
21
23
  },
22
24
  "dependencies": {
23
- "@typescript-eslint/eslint-plugin": "^8.8.1",
24
- "@typescript-eslint/parser": "^8.8.1",
25
+ "@eslint/js": "^9.12.0",
25
26
  "eslint-config-prettier": "^9.1.0",
26
- "eslint-plugin-array-func": "^4.0.0",
27
+ "eslint-plugin-array-func": "^5.0.2",
27
28
  "eslint-plugin-import": "^2.31.0",
28
29
  "eslint-plugin-jest": "^28.8.3",
29
- "eslint-plugin-json-format": "^2.0.1",
30
30
  "eslint-plugin-n": "^17.11.1",
31
- "eslint-plugin-no-loops": "^0.3.0",
31
+ "eslint-plugin-no-loops": "^0.4.0",
32
+ "eslint-plugin-package-json": "^0.15.3",
32
33
  "eslint-plugin-promise": "^7.1.0",
33
- "eslint-plugin-sonarjs": "^2.0.3"
34
+ "eslint-plugin-sonarjs": "^2.0.3",
35
+ "jsonc-eslint-parser": "^2.4.0",
36
+ "typescript-eslint": "^8.9.0"
37
+ },
38
+ "devDependencies": {
39
+ "@types/eslint__js": "8.42.3",
40
+ "prettier": "3.3.3",
41
+ "prettier-plugin-packagejson": "2.5.3"
34
42
  },
35
43
  "peerDependencies": {
36
- "eslint": "^8.57.0",
37
- "typescript": ">=5.2"
44
+ "eslint": "^9.12.0",
45
+ "typescript": ">=5.4"
38
46
  },
39
- "packageManager": "yarn@4.5.0"
47
+ "packageManager": "yarn@4.5.0",
48
+ "publishConfig": {
49
+ "registry": "https://registry.npmjs.org/"
50
+ }
40
51
  }