eslint-config-isaacscript 4.9.0 → 4.10.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.
|
@@ -147,6 +147,7 @@ const SUPPORTED_RULES = {
|
|
|
147
147
|
"@typescript-eslint/no-unsafe-enum-comparison": "error",
|
|
148
148
|
"@typescript-eslint/no-unsafe-member-access": "error",
|
|
149
149
|
"@typescript-eslint/no-unsafe-return": "error",
|
|
150
|
+
"@typescript-eslint/no-unsafe-unary-minus": "error",
|
|
150
151
|
"@typescript-eslint/no-useless-empty-export": "error",
|
|
151
152
|
"@typescript-eslint/no-var-requires": "error",
|
|
152
153
|
"@typescript-eslint/non-nullable-type-assertion-style": "error",
|
|
@@ -333,7 +334,8 @@ const EXTENSION_RULES = {
|
|
|
333
334
|
*
|
|
334
335
|
* - "src" directories (but allowed in test files that are in a separate "tests" directory)
|
|
335
336
|
* - "dist" directories
|
|
336
|
-
* - "index" files
|
|
337
|
+
* - "index" files (things in the same package should directly import instead of use the public
|
|
338
|
+
* API)
|
|
337
339
|
*/
|
|
338
340
|
"@typescript-eslint/no-restricted-imports": [
|
|
339
341
|
"error",
|
|
@@ -342,13 +344,13 @@ const EXTENSION_RULES = {
|
|
|
342
344
|
// Some "src" directories have an "index.ts" file, which means that importing from the
|
|
343
345
|
// directory is valid. Thus, we check for the "src" directory with no suffix.
|
|
344
346
|
{
|
|
345
|
-
group: ["
|
|
347
|
+
group: ["**/src"],
|
|
346
348
|
message:
|
|
347
349
|
'You cannot import from a "src" directory. If this is a monorepo, import using the package name like you would in a non-monorepo project.',
|
|
348
350
|
},
|
|
349
351
|
|
|
350
352
|
{
|
|
351
|
-
group: ["
|
|
353
|
+
group: ["**/src/**"],
|
|
352
354
|
message:
|
|
353
355
|
'You cannot import from a "src" directory. If this is a monorepo, import using the package name like you would in a non-monorepo project.',
|
|
354
356
|
},
|
|
@@ -356,25 +358,25 @@ const EXTENSION_RULES = {
|
|
|
356
358
|
// Some "dist" directories have an "index.ts" file, which means that importing from the
|
|
357
359
|
// directory is valid. Thus, we check for the "dist" directory with no suffix.
|
|
358
360
|
{
|
|
359
|
-
group: ["
|
|
361
|
+
group: ["**/dist"],
|
|
360
362
|
message:
|
|
361
363
|
'You cannot import from a "dist" directory. If this is a monorepo, import using the package name like you would in a non-monorepo project.',
|
|
362
364
|
},
|
|
363
365
|
|
|
364
366
|
{
|
|
365
|
-
group: ["
|
|
367
|
+
group: ["**/dist/**"],
|
|
366
368
|
message:
|
|
367
369
|
'You cannot import from a "dist" directory. If this is a monorepo, import using the package name like you would in a non-monorepo project.',
|
|
368
370
|
},
|
|
369
371
|
|
|
370
372
|
{
|
|
371
|
-
group: ["
|
|
373
|
+
group: ["**/index"],
|
|
372
374
|
message:
|
|
373
375
|
"You cannot import from a package index. Instead, import directly from the file where the code is located.",
|
|
374
376
|
},
|
|
375
377
|
|
|
376
378
|
{
|
|
377
|
-
group: ["
|
|
379
|
+
group: ["**/index.{js,cjs,mjs,ts,cts,mts}"],
|
|
378
380
|
message:
|
|
379
381
|
"You cannot import from a package index. Instead, import directly from the file where the code is located.",
|
|
380
382
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-isaacscript",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.0",
|
|
4
4
|
"description": "A sharable ESLint config for TypeScript and IsaacScript projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"scripts": {
|
|
34
|
-
"lint": "tsx ./scripts/lint.mts"
|
|
34
|
+
"lint": "tsx ./scripts/lint.mts",
|
|
35
|
+
"query-rule": "tsx ./scripts/queryRule.mts"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"confusing-browser-globals": "^1.0.11"
|