eslint-config-un 0.0.4 → 0.0.5
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 +12 -4
- package/dist/index.d.cts +299 -279
- package/dist/index.d.ts +299 -279
- package/dist/index.js +12 -4
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -33,9 +33,9 @@ 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.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
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"node_modules/.pnpm/tsup@8.2.
|
|
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"() {
|
|
39
39
|
"use strict";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -1350,12 +1350,21 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1350
1350
|
// Reason for disabling autofix: could remove type aliases
|
|
1351
1351
|
...disableAutofixForRule("@typescript-eslint/no-unnecessary-type-arguments", ERROR),
|
|
1352
1352
|
// '@typescript-eslint/no-unnecessary-type-assertion': ERROR,
|
|
1353
|
+
// TODO avoid duplication?
|
|
1353
1354
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-unsafe-argument"),
|
|
1354
1355
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-unsafe-assignment"),
|
|
1355
1356
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-unsafe-call"),
|
|
1356
1357
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-unsafe-enum-comparison"),
|
|
1357
1358
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-unsafe-member-access"),
|
|
1358
1359
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-unsafe-return"),
|
|
1360
|
+
...options.disableNoUnsafeRules && {
|
|
1361
|
+
"@typescript-eslint/no-unsafe-argument": OFF,
|
|
1362
|
+
"@typescript-eslint/no-unsafe-assignment": OFF,
|
|
1363
|
+
"@typescript-eslint/no-unsafe-call": OFF,
|
|
1364
|
+
"@typescript-eslint/no-unsafe-enum-comparison": OFF,
|
|
1365
|
+
"@typescript-eslint/no-unsafe-member-access": OFF,
|
|
1366
|
+
"@typescript-eslint/no-unsafe-return": OFF
|
|
1367
|
+
},
|
|
1359
1368
|
"no-throw-literal": OFF,
|
|
1360
1369
|
// Note: has different name
|
|
1361
1370
|
"@typescript-eslint/only-throw-error": [
|
|
@@ -1538,6 +1547,7 @@ var unicornEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1538
1547
|
// 'unicorn/no-invalid-fetch-options': ERROR,
|
|
1539
1548
|
// 'unicorn/no-invalid-remove-event-listener': ERROR,
|
|
1540
1549
|
// 'unicorn/no-keyword-prefix': OFF, // 🔴
|
|
1550
|
+
// 'unicorn/no-length-as-slice-end': OFF,
|
|
1541
1551
|
// 'unicorn/no-lonely-if': ERROR,
|
|
1542
1552
|
// 'unicorn/no-magic-array-flat-depth': ERROR,
|
|
1543
1553
|
// "This is an improved version of the no-negated-condition ESLint rule that makes it automatically fixable" - Unicorn docs
|
|
@@ -1649,7 +1659,6 @@ var unicornEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1649
1659
|
...options.files && { files: options.files },
|
|
1650
1660
|
...options.ignores && { ignores: options.ignores },
|
|
1651
1661
|
rules: {
|
|
1652
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1653
1662
|
...import_eslint_plugin_unicorn.default.configs["flat/recommended"].rules,
|
|
1654
1663
|
...rules,
|
|
1655
1664
|
...options.overrides
|
|
@@ -2279,7 +2288,6 @@ var eslintConfig = (options = {}) => {
|
|
|
2279
2288
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
2280
2289
|
"disable-autofix": import_eslint_plugin_disable_autofix.default,
|
|
2281
2290
|
// Used in multiple configs and we can't define plugin multiple times
|
|
2282
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
2283
2291
|
unicorn: import_eslint_plugin_unicorn2.default,
|
|
2284
2292
|
"@stylistic": import_eslint_plugin.default
|
|
2285
2293
|
},
|