eslint-config-un 0.0.5 → 0.0.6
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/dist/index.cjs +24 -30
- package/dist/index.d.cts +1634 -2957
- package/dist/index.d.ts +1634 -2957
- package/dist/index.js +24 -30
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -33,16 +33,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// node_modules/.pnpm/tsup@8.2.
|
|
36
|
+
// node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.39_tsx@4.16.2_typescript@5.5.4_yaml@2.4.5/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"node_modules/.pnpm/tsup@8.2.
|
|
38
|
+
"node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.39_tsx@4.16.2_typescript@5.5.4_yaml@2.4.5/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
"use strict";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
// node_modules/.pnpm/@eslint+js@9.
|
|
43
|
+
// node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/configs/eslint-all.js
|
|
44
44
|
var require_eslint_all = __commonJS({
|
|
45
|
-
"node_modules/.pnpm/@eslint+js@9.
|
|
45
|
+
"node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/configs/eslint-all.js"(exports2, module2) {
|
|
46
46
|
"use strict";
|
|
47
47
|
init_cjs_shims();
|
|
48
48
|
module2.exports = Object.freeze({
|
|
@@ -249,9 +249,9 @@ var require_eslint_all = __commonJS({
|
|
|
249
249
|
}
|
|
250
250
|
});
|
|
251
251
|
|
|
252
|
-
// node_modules/.pnpm/@eslint+js@9.
|
|
252
|
+
// node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/configs/eslint-recommended.js
|
|
253
253
|
var require_eslint_recommended = __commonJS({
|
|
254
|
-
"node_modules/.pnpm/@eslint+js@9.
|
|
254
|
+
"node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/configs/eslint-recommended.js"(exports2, module2) {
|
|
255
255
|
"use strict";
|
|
256
256
|
init_cjs_shims();
|
|
257
257
|
module2.exports = Object.freeze({
|
|
@@ -322,9 +322,9 @@ var require_eslint_recommended = __commonJS({
|
|
|
322
322
|
}
|
|
323
323
|
});
|
|
324
324
|
|
|
325
|
-
// node_modules/.pnpm/@eslint+js@9.
|
|
325
|
+
// node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/index.js
|
|
326
326
|
var require_src = __commonJS({
|
|
327
|
-
"node_modules/.pnpm/@eslint+js@9.
|
|
327
|
+
"node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/index.js"(exports2, module2) {
|
|
328
328
|
"use strict";
|
|
329
329
|
init_cjs_shims();
|
|
330
330
|
module2.exports = {
|
|
@@ -1211,7 +1211,7 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1211
1211
|
extraFileExtensions: options.extraFileExtensions?.map((ext) => `.${ext}`),
|
|
1212
1212
|
sourceType: "module",
|
|
1213
1213
|
...isTypeAware && {
|
|
1214
|
-
|
|
1214
|
+
projectService: true,
|
|
1215
1215
|
tsconfigRootDir: process.cwd()
|
|
1216
1216
|
},
|
|
1217
1217
|
...options.parserOptions
|
|
@@ -1223,17 +1223,16 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1223
1223
|
...import_typescript_eslint.plugin.configs?.stylistic?.rules,
|
|
1224
1224
|
// 🔵 Strict - overrides
|
|
1225
1225
|
// '@typescript-eslint/ban-ts-comment': ERROR,
|
|
1226
|
-
"@typescript-eslint/ban-types": [ERROR, { types: { object: false, "{}": false } }],
|
|
1227
1226
|
...overrideBaseRule2("no-array-constructor", ERROR),
|
|
1228
1227
|
// '@typescript-eslint/no-duplicate-enum-values': ERROR,
|
|
1229
1228
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-dynamic-delete"),
|
|
1229
|
+
"@typescript-eslint/no-empty-object-type": [ERROR, { allowInterfaces: "with-single-extends" }],
|
|
1230
1230
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-explicit-any", {
|
|
1231
1231
|
ignoreRestArgs: true
|
|
1232
1232
|
}),
|
|
1233
1233
|
// '@typescript-eslint/no-extra-non-null-assertion': ERROR,
|
|
1234
1234
|
// '@typescript-eslint/no-extraneous-class': ERROR,
|
|
1235
1235
|
// '@typescript-eslint/no-invalid-void-type': ERROR,
|
|
1236
|
-
...overrideBaseRule2("no-loss-of-precision", ERROR),
|
|
1237
1236
|
// '@typescript-eslint/no-misused-new': ERROR,
|
|
1238
1237
|
// '@typescript-eslint/no-namespace': ERROR,
|
|
1239
1238
|
// '@typescript-eslint/no-non-null-asserted-nullish-coalescing': ERROR,
|
|
@@ -1242,11 +1241,13 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1242
1241
|
// '@typescript-eslint/no-this-alias': ERROR,
|
|
1243
1242
|
// '@typescript-eslint/no-unnecessary-type-constraint': ERROR,
|
|
1244
1243
|
// '@typescript-eslint/no-unsafe-declaration-merging': ERROR,
|
|
1244
|
+
// '@typescript-eslint/no-unsafe-function-type': ERROR,
|
|
1245
1245
|
...overrideBaseRule2("no-unused-vars", ERROR, { ignoreRestSiblings: true }),
|
|
1246
1246
|
...overrideBaseRule2("no-useless-constructor", ERROR),
|
|
1247
|
-
// '@typescript-eslint/no-
|
|
1247
|
+
// '@typescript-eslint/no-wrapper-object-types': ERROR,
|
|
1248
1248
|
// '@typescript-eslint/prefer-as-const': ERROR,
|
|
1249
1249
|
"@typescript-eslint/prefer-literal-enum-member": [ERROR, { allowBitwiseExpressions: true }],
|
|
1250
|
+
// '@typescript-eslint/prefer-namespace-keyword': ERROR,
|
|
1250
1251
|
// '@typescript-eslint/triple-slash-reference': ERROR,
|
|
1251
1252
|
// '@typescript-eslint/unified-signatures': ERROR,
|
|
1252
1253
|
// 🔵 Stylistic - overrides
|
|
@@ -1260,11 +1261,9 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1260
1261
|
// '@typescript-eslint/consistent-type-definitions': ERROR,
|
|
1261
1262
|
// '@typescript-eslint/no-confusing-non-null-assertion': ERROR,
|
|
1262
1263
|
...overrideBaseRule2("no-empty-function", ERROR),
|
|
1263
|
-
"@typescript-eslint/no-empty-interface": [ERROR, { allowSingleExtends: true }],
|
|
1264
1264
|
// '@typescript-eslint/no-inferrable-types': ERROR,
|
|
1265
1265
|
// '@typescript-eslint/prefer-for-of': ERROR,
|
|
1266
1266
|
// '@typescript-eslint/prefer-function-type': ERROR,
|
|
1267
|
-
// '@typescript-eslint/prefer-namespace-keyword': ERROR,
|
|
1268
1267
|
// 🔵 Additional rules
|
|
1269
1268
|
...overrideBaseRule2("class-methods-use-this", ERROR, {
|
|
1270
1269
|
ignoreOverrideMethods: true,
|
|
@@ -1286,20 +1285,13 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1286
1285
|
// '@typescript-eslint/member-ordering': OFF, // ❄️
|
|
1287
1286
|
"@typescript-eslint/method-signature-style": ERROR,
|
|
1288
1287
|
// ...overrideBaseRule('no-dupe-class-members', OFF), // 👍
|
|
1289
|
-
"@typescript-eslint/no-empty-object-type": [
|
|
1290
|
-
ERROR,
|
|
1291
|
-
{
|
|
1292
|
-
allowInterfaces: "with-single-extends",
|
|
1293
|
-
allowObjectTypes: "always"
|
|
1294
|
-
}
|
|
1295
|
-
],
|
|
1296
1288
|
"@typescript-eslint/no-import-type-side-effects": ERROR,
|
|
1297
1289
|
// ...overrideBaseRule('no-invalid-this', OFF), // 👍
|
|
1298
1290
|
...overrideBaseRule2("no-loop-func", ERROR),
|
|
1299
1291
|
// ...overrideBaseRule('no-magic-numbers', OFF),
|
|
1300
1292
|
"no-redeclare": OFF,
|
|
1301
1293
|
// '@typescript-eslint/no-redeclare': OFF, // 👍
|
|
1302
|
-
|
|
1294
|
+
"@typescript-eslint/no-require-imports": OFF,
|
|
1303
1295
|
// ...overrideBaseRule('no-restricted-imports', OFF),
|
|
1304
1296
|
...overrideBaseRule2("no-shadow", ERROR),
|
|
1305
1297
|
"@typescript-eslint/no-unnecessary-parameter-property-assignment": ERROR,
|
|
@@ -1365,6 +1357,7 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1365
1357
|
"@typescript-eslint/no-unsafe-member-access": OFF,
|
|
1366
1358
|
"@typescript-eslint/no-unsafe-return": OFF
|
|
1367
1359
|
},
|
|
1360
|
+
// '@typescript-eslint/no-unsafe-unary-minus': ERROR,
|
|
1368
1361
|
"no-throw-literal": OFF,
|
|
1369
1362
|
// Note: has different name
|
|
1370
1363
|
"@typescript-eslint/only-throw-error": [
|
|
@@ -1373,9 +1366,6 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1373
1366
|
allowThrowingUnknown: true
|
|
1374
1367
|
}
|
|
1375
1368
|
],
|
|
1376
|
-
"unicorn/prefer-includes": OFF,
|
|
1377
|
-
// Note: in Unicorn
|
|
1378
|
-
"@typescript-eslint/prefer-includes": ERROR,
|
|
1379
1369
|
...overrideBaseRule2("prefer-promise-reject-errors", ERROR),
|
|
1380
1370
|
// '@typescript-eslint/prefer-reduce-type-parameter': ERROR,
|
|
1381
1371
|
// '@typescript-eslint/prefer-return-this-type': ERROR,
|
|
@@ -1392,8 +1382,12 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1392
1382
|
allowIndexSignaturePropertyAccess: true
|
|
1393
1383
|
}),
|
|
1394
1384
|
// '@typescript-eslint/non-nullable-type-assertion-style': ERROR,
|
|
1385
|
+
// '@typescript-eslint/prefer-find': ERROR,
|
|
1386
|
+
"unicorn/prefer-includes": OFF,
|
|
1387
|
+
// '@typescript-eslint/prefer-includes': ERROR,
|
|
1395
1388
|
"@typescript-eslint/prefer-nullish-coalescing": OFF,
|
|
1396
1389
|
// '@typescript-eslint/prefer-optional-chain': ERROR,
|
|
1390
|
+
"@typescript-eslint/prefer-regexp-exec": OFF,
|
|
1397
1391
|
"@typescript-eslint/prefer-string-starts-ends-with": [
|
|
1398
1392
|
ERROR,
|
|
1399
1393
|
{
|
|
@@ -1408,18 +1402,16 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1408
1402
|
],
|
|
1409
1403
|
// '@typescript-eslint/naming-convention': OFF, // ❄️
|
|
1410
1404
|
// '@typescript-eslint/no-unnecessary-qualifier': OFF,
|
|
1411
|
-
"@typescript-eslint/no-unsafe-unary-minus": ERROR,
|
|
1412
1405
|
...overrideBaseRule2("prefer-destructuring", ERROR, RULE_PREFER_DESTRUCTURING_OPTIONS),
|
|
1413
1406
|
"unicorn/prefer-array-find": OFF,
|
|
1414
1407
|
// Note: in Unicorn
|
|
1415
|
-
"@typescript-eslint/prefer-find": ERROR,
|
|
1416
1408
|
"@typescript-eslint/prefer-readonly": ERROR,
|
|
1417
1409
|
// '@typescript-eslint/prefer-readonly-parameter-types': OFF,
|
|
1418
|
-
// '@typescript-eslint/prefer-regexp-exec': OFF,
|
|
1419
1410
|
// '@typescript-eslint/promise-function-async': OFF,
|
|
1420
1411
|
// '@typescript-eslint/require-array-sort-compare': OFF,
|
|
1421
1412
|
// Note: has different name. Also note that the original rule is deprecated and not included in this config, but we disable it anyway just for safety
|
|
1422
1413
|
"no-return-await": OFF,
|
|
1414
|
+
// Disabled by default since v8
|
|
1423
1415
|
"@typescript-eslint/return-await": [ERROR, "always"],
|
|
1424
1416
|
// '@typescript-eslint/strict-boolean-expressions': OFF,
|
|
1425
1417
|
"@typescript-eslint/switch-exhaustiveness-check": ERROR,
|
|
@@ -1549,7 +1541,8 @@ var unicornEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1549
1541
|
// 'unicorn/no-keyword-prefix': OFF, // 🔴
|
|
1550
1542
|
// 'unicorn/no-length-as-slice-end': OFF,
|
|
1551
1543
|
// 'unicorn/no-lonely-if': ERROR,
|
|
1552
|
-
// '
|
|
1544
|
+
// Passing `Infinity` doesn't work great with TypeScript
|
|
1545
|
+
"unicorn/no-magic-array-flat-depth": OFF,
|
|
1553
1546
|
// "This is an improved version of the no-negated-condition ESLint rule that makes it automatically fixable" - Unicorn docs
|
|
1554
1547
|
// 'no-negated-condition': OFF,
|
|
1555
1548
|
// 'unicorn/no-negated-condition': ERROR,
|
|
@@ -1617,12 +1610,13 @@ var unicornEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1617
1610
|
// 'unicorn/prefer-negative-index': ERROR,
|
|
1618
1611
|
"unicorn/prefer-node-protocol": OFF,
|
|
1619
1612
|
// `n/prefer-node-protocol` seem to be better as it checks supported node versions
|
|
1620
|
-
|
|
1613
|
+
"unicorn/prefer-number-properties": [ERROR, { checkInfinity: true }],
|
|
1621
1614
|
// 'unicorn/prefer-object-from-entries': ERROR,
|
|
1622
1615
|
// 'unicorn/prefer-optional-catch-binding': ERROR,
|
|
1623
1616
|
// 'unicorn/prefer-prototype-methods': ERROR,
|
|
1624
1617
|
"unicorn/prefer-query-selector": OFF,
|
|
1625
1618
|
// 'unicorn/prefer-reflect-apply': ERROR,
|
|
1619
|
+
// TODO disable when regexp is enabled?
|
|
1626
1620
|
// 'unicorn/prefer-regexp-test': ERROR,
|
|
1627
1621
|
// 'unicorn/prefer-set-has': ERROR,
|
|
1628
1622
|
// 'unicorn/prefer-set-size': ERROR,
|