eslint-config-un 0.0.5 → 0.0.7

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 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.3_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
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.3_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"() {
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.7.0/node_modules/@eslint/js/src/configs/eslint-all.js
43
+ // node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/configs/eslint-all.js
44
44
  var require_eslint_all = __commonJS({
45
- "node_modules/.pnpm/@eslint+js@9.7.0/node_modules/@eslint/js/src/configs/eslint-all.js"(exports2, module2) {
45
+ "node_modules/.pnpm/@eslint+js@9.9.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.7.0/node_modules/@eslint/js/src/configs/eslint-recommended.js
252
+ // node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/configs/eslint-recommended.js
253
253
  var require_eslint_recommended = __commonJS({
254
- "node_modules/.pnpm/@eslint+js@9.7.0/node_modules/@eslint/js/src/configs/eslint-recommended.js"(exports2, module2) {
254
+ "node_modules/.pnpm/@eslint+js@9.9.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.7.0/node_modules/@eslint/js/src/index.js
325
+ // node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/index.js
326
326
  var require_src = __commonJS({
327
- "node_modules/.pnpm/@eslint+js@9.7.0/node_modules/@eslint/js/src/index.js"(exports2, module2) {
327
+ "node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/index.js"(exports2, module2) {
328
328
  "use strict";
329
329
  init_cjs_shims();
330
330
  module2.exports = {
@@ -896,6 +896,7 @@ var promiseEslintConfig = (options = {}, internalOptions = {}) => {
896
896
  // 'promise/param-names': ERROR,
897
897
  // 'promise/prefer-await-to-callbacks': OFF,
898
898
  // 'promise/prefer-await-to-then': OFF,
899
+ "promise/spec-only": ERROR,
899
900
  "promise/valid-params": ERROR
900
901
  // Default: warn
901
902
  };
@@ -1211,7 +1212,7 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
1211
1212
  extraFileExtensions: options.extraFileExtensions?.map((ext) => `.${ext}`),
1212
1213
  sourceType: "module",
1213
1214
  ...isTypeAware && {
1214
- project: arraify(options.tsconfigPath),
1215
+ projectService: true,
1215
1216
  tsconfigRootDir: process.cwd()
1216
1217
  },
1217
1218
  ...options.parserOptions
@@ -1223,17 +1224,16 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
1223
1224
  ...import_typescript_eslint.plugin.configs?.stylistic?.rules,
1224
1225
  // 🔵 Strict - overrides
1225
1226
  // '@typescript-eslint/ban-ts-comment': ERROR,
1226
- "@typescript-eslint/ban-types": [ERROR, { types: { object: false, "{}": false } }],
1227
1227
  ...overrideBaseRule2("no-array-constructor", ERROR),
1228
1228
  // '@typescript-eslint/no-duplicate-enum-values': ERROR,
1229
1229
  ...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-dynamic-delete"),
1230
+ "@typescript-eslint/no-empty-object-type": [ERROR, { allowInterfaces: "with-single-extends" }],
1230
1231
  ...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-explicit-any", {
1231
1232
  ignoreRestArgs: true
1232
1233
  }),
1233
1234
  // '@typescript-eslint/no-extra-non-null-assertion': ERROR,
1234
1235
  // '@typescript-eslint/no-extraneous-class': ERROR,
1235
1236
  // '@typescript-eslint/no-invalid-void-type': ERROR,
1236
- ...overrideBaseRule2("no-loss-of-precision", ERROR),
1237
1237
  // '@typescript-eslint/no-misused-new': ERROR,
1238
1238
  // '@typescript-eslint/no-namespace': ERROR,
1239
1239
  // '@typescript-eslint/no-non-null-asserted-nullish-coalescing': ERROR,
@@ -1242,11 +1242,13 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
1242
1242
  // '@typescript-eslint/no-this-alias': ERROR,
1243
1243
  // '@typescript-eslint/no-unnecessary-type-constraint': ERROR,
1244
1244
  // '@typescript-eslint/no-unsafe-declaration-merging': ERROR,
1245
+ // '@typescript-eslint/no-unsafe-function-type': ERROR,
1245
1246
  ...overrideBaseRule2("no-unused-vars", ERROR, { ignoreRestSiblings: true }),
1246
1247
  ...overrideBaseRule2("no-useless-constructor", ERROR),
1247
- // '@typescript-eslint/no-var-requires': ERROR,
1248
+ // '@typescript-eslint/no-wrapper-object-types': ERROR,
1248
1249
  // '@typescript-eslint/prefer-as-const': ERROR,
1249
1250
  "@typescript-eslint/prefer-literal-enum-member": [ERROR, { allowBitwiseExpressions: true }],
1251
+ // '@typescript-eslint/prefer-namespace-keyword': ERROR,
1250
1252
  // '@typescript-eslint/triple-slash-reference': ERROR,
1251
1253
  // '@typescript-eslint/unified-signatures': ERROR,
1252
1254
  // 🔵 Stylistic - overrides
@@ -1260,11 +1262,9 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
1260
1262
  // '@typescript-eslint/consistent-type-definitions': ERROR,
1261
1263
  // '@typescript-eslint/no-confusing-non-null-assertion': ERROR,
1262
1264
  ...overrideBaseRule2("no-empty-function", ERROR),
1263
- "@typescript-eslint/no-empty-interface": [ERROR, { allowSingleExtends: true }],
1264
1265
  // '@typescript-eslint/no-inferrable-types': ERROR,
1265
1266
  // '@typescript-eslint/prefer-for-of': ERROR,
1266
1267
  // '@typescript-eslint/prefer-function-type': ERROR,
1267
- // '@typescript-eslint/prefer-namespace-keyword': ERROR,
1268
1268
  // 🔵 Additional rules
1269
1269
  ...overrideBaseRule2("class-methods-use-this", ERROR, {
1270
1270
  ignoreOverrideMethods: true,
@@ -1286,20 +1286,13 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
1286
1286
  // '@typescript-eslint/member-ordering': OFF, // ❄️
1287
1287
  "@typescript-eslint/method-signature-style": ERROR,
1288
1288
  // ...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
1289
  "@typescript-eslint/no-import-type-side-effects": ERROR,
1297
1290
  // ...overrideBaseRule('no-invalid-this', OFF), // 👍
1298
1291
  ...overrideBaseRule2("no-loop-func", ERROR),
1299
1292
  // ...overrideBaseRule('no-magic-numbers', OFF),
1300
1293
  "no-redeclare": OFF,
1301
1294
  // '@typescript-eslint/no-redeclare': OFF, // 👍
1302
- // '@typescript-eslint/no-require-imports': OFF,
1295
+ "@typescript-eslint/no-require-imports": OFF,
1303
1296
  // ...overrideBaseRule('no-restricted-imports', OFF),
1304
1297
  ...overrideBaseRule2("no-shadow", ERROR),
1305
1298
  "@typescript-eslint/no-unnecessary-parameter-property-assignment": ERROR,
@@ -1365,6 +1358,7 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
1365
1358
  "@typescript-eslint/no-unsafe-member-access": OFF,
1366
1359
  "@typescript-eslint/no-unsafe-return": OFF
1367
1360
  },
1361
+ // '@typescript-eslint/no-unsafe-unary-minus': ERROR,
1368
1362
  "no-throw-literal": OFF,
1369
1363
  // Note: has different name
1370
1364
  "@typescript-eslint/only-throw-error": [
@@ -1373,9 +1367,6 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
1373
1367
  allowThrowingUnknown: true
1374
1368
  }
1375
1369
  ],
1376
- "unicorn/prefer-includes": OFF,
1377
- // Note: in Unicorn
1378
- "@typescript-eslint/prefer-includes": ERROR,
1379
1370
  ...overrideBaseRule2("prefer-promise-reject-errors", ERROR),
1380
1371
  // '@typescript-eslint/prefer-reduce-type-parameter': ERROR,
1381
1372
  // '@typescript-eslint/prefer-return-this-type': ERROR,
@@ -1392,8 +1383,12 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
1392
1383
  allowIndexSignaturePropertyAccess: true
1393
1384
  }),
1394
1385
  // '@typescript-eslint/non-nullable-type-assertion-style': ERROR,
1386
+ // '@typescript-eslint/prefer-find': ERROR,
1387
+ "unicorn/prefer-includes": OFF,
1388
+ // '@typescript-eslint/prefer-includes': ERROR,
1395
1389
  "@typescript-eslint/prefer-nullish-coalescing": OFF,
1396
1390
  // '@typescript-eslint/prefer-optional-chain': ERROR,
1391
+ "@typescript-eslint/prefer-regexp-exec": OFF,
1397
1392
  "@typescript-eslint/prefer-string-starts-ends-with": [
1398
1393
  ERROR,
1399
1394
  {
@@ -1408,18 +1403,16 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
1408
1403
  ],
1409
1404
  // '@typescript-eslint/naming-convention': OFF, // ❄️
1410
1405
  // '@typescript-eslint/no-unnecessary-qualifier': OFF,
1411
- "@typescript-eslint/no-unsafe-unary-minus": ERROR,
1412
1406
  ...overrideBaseRule2("prefer-destructuring", ERROR, RULE_PREFER_DESTRUCTURING_OPTIONS),
1413
1407
  "unicorn/prefer-array-find": OFF,
1414
1408
  // Note: in Unicorn
1415
- "@typescript-eslint/prefer-find": ERROR,
1416
1409
  "@typescript-eslint/prefer-readonly": ERROR,
1417
1410
  // '@typescript-eslint/prefer-readonly-parameter-types': OFF,
1418
- // '@typescript-eslint/prefer-regexp-exec': OFF,
1419
1411
  // '@typescript-eslint/promise-function-async': OFF,
1420
1412
  // '@typescript-eslint/require-array-sort-compare': OFF,
1421
1413
  // 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
1414
  "no-return-await": OFF,
1415
+ // Disabled by default since v8
1423
1416
  "@typescript-eslint/return-await": [ERROR, "always"],
1424
1417
  // '@typescript-eslint/strict-boolean-expressions': OFF,
1425
1418
  "@typescript-eslint/switch-exhaustiveness-check": ERROR,
@@ -1482,13 +1475,14 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
1482
1475
  files: ["**/*.d.?([cm])ts"],
1483
1476
  rules: {
1484
1477
  "@typescript-eslint/consistent-indexed-object-style": OFF,
1478
+ "@typescript-eslint/method-signature-style": OFF,
1479
+ "@typescript-eslint/no-empty-object-type": OFF,
1485
1480
  "@typescript-eslint/no-explicit-any": OFF,
1486
- "@typescript-eslint/no-use-before-define": OFF,
1487
- "@typescript-eslint/no-unused-vars": OFF,
1488
1481
  "@typescript-eslint/no-shadow": OFF,
1489
- "@typescript-eslint/method-signature-style": OFF,
1490
- "import/no-default-export": OFF,
1491
- "import/newline-after-import": OFF
1482
+ "@typescript-eslint/no-unused-vars": OFF,
1483
+ "@typescript-eslint/no-use-before-define": OFF,
1484
+ "import/newline-after-import": OFF,
1485
+ "import/no-default-export": OFF
1492
1486
  },
1493
1487
  name: genFlatConfigEntryName("ts/dts")
1494
1488
  },
@@ -1549,7 +1543,8 @@ var unicornEslintConfig = (options = {}, internalOptions = {}) => {
1549
1543
  // 'unicorn/no-keyword-prefix': OFF, // 🔴
1550
1544
  // 'unicorn/no-length-as-slice-end': OFF,
1551
1545
  // 'unicorn/no-lonely-if': ERROR,
1552
- // 'unicorn/no-magic-array-flat-depth': ERROR,
1546
+ // Passing `Infinity` doesn't work great with TypeScript
1547
+ "unicorn/no-magic-array-flat-depth": OFF,
1553
1548
  // "This is an improved version of the no-negated-condition ESLint rule that makes it automatically fixable" - Unicorn docs
1554
1549
  // 'no-negated-condition': OFF,
1555
1550
  // 'unicorn/no-negated-condition': ERROR,
@@ -1617,12 +1612,13 @@ var unicornEslintConfig = (options = {}, internalOptions = {}) => {
1617
1612
  // 'unicorn/prefer-negative-index': ERROR,
1618
1613
  "unicorn/prefer-node-protocol": OFF,
1619
1614
  // `n/prefer-node-protocol` seem to be better as it checks supported node versions
1620
- // 'unicorn/prefer-number-properties': ERROR,
1615
+ "unicorn/prefer-number-properties": [ERROR, { checkInfinity: true }],
1621
1616
  // 'unicorn/prefer-object-from-entries': ERROR,
1622
1617
  // 'unicorn/prefer-optional-catch-binding': ERROR,
1623
1618
  // 'unicorn/prefer-prototype-methods': ERROR,
1624
1619
  "unicorn/prefer-query-selector": OFF,
1625
1620
  // 'unicorn/prefer-reflect-apply': ERROR,
1621
+ // TODO disable when regexp is enabled?
1626
1622
  // 'unicorn/prefer-regexp-test': ERROR,
1627
1623
  // 'unicorn/prefer-set-has': ERROR,
1628
1624
  // 'unicorn/prefer-set-size': ERROR,
@@ -2150,6 +2146,7 @@ var vueEslintConfig = (options, internalOptions = {}) => {
2150
2146
  name: genFlatConfigEntryName("vue/allow-default-export")
2151
2147
  },
2152
2148
  a11y && [
2149
+ // TODO don't have our name
2153
2150
  ...import_eslint_plugin_vuejs_accessibility.default.configs["flat/recommended"],
2154
2151
  {
2155
2152
  files,
@@ -2164,7 +2161,10 @@ var vueEslintConfig = (options, internalOptions = {}) => {
2164
2161
  // 'vuejs-accessibility/heading-has-content': ERROR,
2165
2162
  // 'vuejs-accessibility/iframe-has-title': ERROR,
2166
2163
  // 'vuejs-accessibility/interactive-supports-focus': ERROR,
2167
- // 'vuejs-accessibility/label-has-for': ERROR,
2164
+ "vuejs-accessibility/label-has-for": [
2165
+ ERROR,
2166
+ { allowChildren: true }
2167
+ ],
2168
2168
  // 'vuejs-accessibility/media-has-caption': ERROR,
2169
2169
  // 'vuejs-accessibility/mouse-events-have-key-events': ERROR,
2170
2170
  // 'vuejs-accessibility/no-access-key': ERROR,