eslint-config-un 0.0.3 → 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/README.md +1 -1
- package/dist/index.cjs +21 -15
- package/dist/index.d.cts +25127 -4
- package/dist/index.d.ts +25127 -4
- package/dist/index.js +27 -21
- package/package.json +40 -38
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# eslint-config-un
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/
|
|
3
|
+
[](https://www.npmjs.com/package/eslint-config-un)
|
|
4
4
|
|
|
5
5
|
Grown out of the personal collection of rules, an ESLint config aspiring to cover as many rules as possible, be reasonably strict and easily configurable. Only supports ESLint 9 and the flat config format.
|
|
6
6
|
|
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.1.
|
|
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.1.
|
|
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
|
});
|
|
42
42
|
|
|
43
|
-
// node_modules/.pnpm/@eslint+js@9.
|
|
43
|
+
// node_modules/.pnpm/@eslint+js@9.7.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.7.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.7.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.7.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.7.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.7.0/node_modules/@eslint/js/src/index.js"(exports2, module2) {
|
|
328
328
|
"use strict";
|
|
329
329
|
init_cjs_shims();
|
|
330
330
|
module2.exports = {
|
|
@@ -453,7 +453,9 @@ var importEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
453
453
|
"import/no-unresolved": [
|
|
454
454
|
ERROR,
|
|
455
455
|
{
|
|
456
|
-
...noUnresolvedIgnores.length > 0 && {
|
|
456
|
+
...noUnresolvedIgnores.length > 0 && {
|
|
457
|
+
ignore: noUnresolvedIgnores
|
|
458
|
+
}
|
|
457
459
|
}
|
|
458
460
|
],
|
|
459
461
|
// 'import/no-unused-modules': OFF,
|
|
@@ -611,13 +613,11 @@ var jsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
611
613
|
"no-unreachable-loop": ERROR,
|
|
612
614
|
"no-use-before-define": [ERROR, RULE_NO_USE_BEFORE_DEFINE_OPTIONS],
|
|
613
615
|
"no-useless-assignment": ERROR,
|
|
614
|
-
// @ts-expect-error no options typings
|
|
615
616
|
"require-atomic-updates": [ERROR, { allowProperties: true }],
|
|
616
617
|
// 🔵 Not in recommended - Suggestions
|
|
617
618
|
"accessor-pairs": ERROR,
|
|
618
619
|
// 'arrow-body-style': OFF,
|
|
619
620
|
"block-scoped-var": ERROR,
|
|
620
|
-
// @ts-expect-error incorrect typings
|
|
621
621
|
camelcase: [ERROR, RULE_CAMELCASE_OPTIONS],
|
|
622
622
|
// 'capitalized-comments': OFF,
|
|
623
623
|
"class-methods-use-this": ERROR,
|
|
@@ -644,7 +644,6 @@ var jsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
644
644
|
// 'id-match': OFF,
|
|
645
645
|
// 'init-declarations': OFF,
|
|
646
646
|
"logical-assignment-operators": [ERROR, "always", { enforceForIfStatements: true }],
|
|
647
|
-
// @ts-expect-error incorrect typings
|
|
648
647
|
"max-classes-per-file": [ERROR, { ignoreExpressions: true, max: 2 }],
|
|
649
648
|
// 'max-depth': OFF,
|
|
650
649
|
// 'max-lines': OFF,
|
|
@@ -729,7 +728,6 @@ var jsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
729
728
|
"no-useless-rename": ERROR,
|
|
730
729
|
"no-useless-return": ERROR,
|
|
731
730
|
"no-var": ERROR,
|
|
732
|
-
// @ts-expect-error incorrect typings
|
|
733
731
|
"no-void": [ERROR, { allowAsStatement: true }],
|
|
734
732
|
// 'no-warning-comments': OFF,
|
|
735
733
|
"object-shorthand": ERROR,
|
|
@@ -1352,12 +1350,21 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1352
1350
|
// Reason for disabling autofix: could remove type aliases
|
|
1353
1351
|
...disableAutofixForRule("@typescript-eslint/no-unnecessary-type-arguments", ERROR),
|
|
1354
1352
|
// '@typescript-eslint/no-unnecessary-type-assertion': ERROR,
|
|
1353
|
+
// TODO avoid duplication?
|
|
1355
1354
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-unsafe-argument"),
|
|
1356
1355
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-unsafe-assignment"),
|
|
1357
1356
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-unsafe-call"),
|
|
1358
1357
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-unsafe-enum-comparison"),
|
|
1359
1358
|
...warnUnlessForcedError(internalOptions, "@typescript-eslint/no-unsafe-member-access"),
|
|
1360
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
|
+
},
|
|
1361
1368
|
"no-throw-literal": OFF,
|
|
1362
1369
|
// Note: has different name
|
|
1363
1370
|
"@typescript-eslint/only-throw-error": [
|
|
@@ -1540,6 +1547,7 @@ var unicornEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1540
1547
|
// 'unicorn/no-invalid-fetch-options': ERROR,
|
|
1541
1548
|
// 'unicorn/no-invalid-remove-event-listener': ERROR,
|
|
1542
1549
|
// 'unicorn/no-keyword-prefix': OFF, // 🔴
|
|
1550
|
+
// 'unicorn/no-length-as-slice-end': OFF,
|
|
1543
1551
|
// 'unicorn/no-lonely-if': ERROR,
|
|
1544
1552
|
// 'unicorn/no-magic-array-flat-depth': ERROR,
|
|
1545
1553
|
// "This is an improved version of the no-negated-condition ESLint rule that makes it automatically fixable" - Unicorn docs
|
|
@@ -1651,7 +1659,6 @@ var unicornEslintConfig = (options = {}, internalOptions = {}) => {
|
|
|
1651
1659
|
...options.files && { files: options.files },
|
|
1652
1660
|
...options.ignores && { ignores: options.ignores },
|
|
1653
1661
|
rules: {
|
|
1654
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1655
1662
|
...import_eslint_plugin_unicorn.default.configs["flat/recommended"].rules,
|
|
1656
1663
|
...rules,
|
|
1657
1664
|
...options.overrides
|
|
@@ -2281,7 +2288,6 @@ var eslintConfig = (options = {}) => {
|
|
|
2281
2288
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
2282
2289
|
"disable-autofix": import_eslint_plugin_disable_autofix.default,
|
|
2283
2290
|
// Used in multiple configs and we can't define plugin multiple times
|
|
2284
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
2285
2291
|
unicorn: import_eslint_plugin_unicorn2.default,
|
|
2286
2292
|
"@stylistic": import_eslint_plugin.default
|
|
2287
2293
|
},
|