@vinicunca/eslint-config 2.15.1 → 2.15.3
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 +29 -30
- package/dist/index.d.cts +220 -104
- package/dist/index.d.ts +220 -104
- package/dist/index.js +28 -29
- package/package.json +11 -11
package/dist/index.cjs
CHANGED
|
@@ -112,25 +112,25 @@ __export(src_exports, {
|
|
|
112
112
|
});
|
|
113
113
|
module.exports = __toCommonJS(src_exports);
|
|
114
114
|
|
|
115
|
-
// ../node_modules/.pnpm/tsup@8.3.5_jiti@2.4.1_postcss@8.4.49_tsx@4.19.2_typescript@5.7.2_yaml@2.
|
|
115
|
+
// ../node_modules/.pnpm/tsup@8.3.5_jiti@2.4.1_postcss@8.4.49_tsx@4.19.2_typescript@5.7.2_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
|
|
116
116
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
117
117
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
118
118
|
|
|
119
|
-
// ../node_modules/.pnpm/@vinicunca+perkakas@1.0
|
|
120
|
-
function r(
|
|
121
|
-
if (typeof
|
|
122
|
-
let
|
|
123
|
-
return
|
|
119
|
+
// ../node_modules/.pnpm/@vinicunca+perkakas@1.1.0/node_modules/@vinicunca/perkakas/dist/chunk-6AFNPQW2.js
|
|
120
|
+
function r(o) {
|
|
121
|
+
if (typeof o != "object" || o === null) return false;
|
|
122
|
+
let e3 = Object.getPrototypeOf(o);
|
|
123
|
+
return e3 === null || e3 === Object.prototype;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
// ../node_modules/.pnpm/@vinicunca+perkakas@1.0
|
|
127
|
-
function e(
|
|
128
|
-
return typeof
|
|
126
|
+
// ../node_modules/.pnpm/@vinicunca+perkakas@1.1.0/node_modules/@vinicunca/perkakas/dist/chunk-Q2HW4RVT.js
|
|
127
|
+
function e(r2) {
|
|
128
|
+
return typeof r2 == "number" && !Number.isNaN(r2);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
// ../node_modules/.pnpm/@vinicunca+perkakas@1.0
|
|
132
|
-
function e2(
|
|
133
|
-
return typeof
|
|
131
|
+
// ../node_modules/.pnpm/@vinicunca+perkakas@1.1.0/node_modules/@vinicunca/perkakas/dist/chunk-AZUJCNUP.js
|
|
132
|
+
function e2(o) {
|
|
133
|
+
return typeof o == "boolean";
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
// src/base.ts
|
|
@@ -537,7 +537,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
537
537
|
endOfLine: "auto",
|
|
538
538
|
semi,
|
|
539
539
|
singleQuote: quotes === "single",
|
|
540
|
-
tabWidth:
|
|
540
|
+
tabWidth: e(indent) ? indent : 2,
|
|
541
541
|
trailingComma: "all",
|
|
542
542
|
useTabs: indent === "tab"
|
|
543
543
|
},
|
|
@@ -551,7 +551,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
551
551
|
};
|
|
552
552
|
const dprintOptions = Object.assign(
|
|
553
553
|
{
|
|
554
|
-
indentWidth:
|
|
554
|
+
indentWidth: e(indent) ? indent : 2,
|
|
555
555
|
quoteStyle: quotes === "single" ? "preferSingle" : "preferDouble",
|
|
556
556
|
useTabs: indent === "tab"
|
|
557
557
|
},
|
|
@@ -1148,7 +1148,7 @@ async function jsonc(options = {}) {
|
|
|
1148
1148
|
} = options;
|
|
1149
1149
|
const {
|
|
1150
1150
|
indent = 2
|
|
1151
|
-
} =
|
|
1151
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
1152
1152
|
const [
|
|
1153
1153
|
pluginJsonc,
|
|
1154
1154
|
parserJsonc
|
|
@@ -1339,7 +1339,6 @@ async function perfectionist() {
|
|
|
1339
1339
|
perfectionist: import_eslint_plugin_perfectionist.default
|
|
1340
1340
|
},
|
|
1341
1341
|
rules: {
|
|
1342
|
-
...import_eslint_plugin_perfectionist.default.configs["recommended-natural"].rules,
|
|
1343
1342
|
"perfectionist/sort-exports": [
|
|
1344
1343
|
ERROR,
|
|
1345
1344
|
{ order: "asc", type: "natural" }
|
|
@@ -1370,11 +1369,7 @@ async function perfectionist() {
|
|
|
1370
1369
|
"perfectionist/sort-named-imports": [
|
|
1371
1370
|
ERROR,
|
|
1372
1371
|
{ order: "asc", type: "natural" }
|
|
1373
|
-
]
|
|
1374
|
-
"perfectionist/sort-vue-attributes": [OFF],
|
|
1375
|
-
"perfectionist/sort-objects": OFF,
|
|
1376
|
-
"perfectionist/sort-object-types": OFF,
|
|
1377
|
-
"perfectionist/sort-interfaces": OFF
|
|
1372
|
+
]
|
|
1378
1373
|
}
|
|
1379
1374
|
}
|
|
1380
1375
|
];
|
|
@@ -1647,7 +1642,10 @@ async function sonar() {
|
|
|
1647
1642
|
rules: {
|
|
1648
1643
|
...import_eslint_plugin_sonarjs.default.configs.recommended.rules,
|
|
1649
1644
|
"sonar/todo-tag": OFF,
|
|
1650
|
-
"sonar/pseudo-random": OFF
|
|
1645
|
+
"sonar/pseudo-random": OFF,
|
|
1646
|
+
"sonar/slow-regex": OFF,
|
|
1647
|
+
"sonar/cognitive-complexity": OFF,
|
|
1648
|
+
"sonar/no-unused-vars": OFF
|
|
1651
1649
|
}
|
|
1652
1650
|
}
|
|
1653
1651
|
];
|
|
@@ -1896,7 +1894,7 @@ async function svelte(options = {}) {
|
|
|
1896
1894
|
const {
|
|
1897
1895
|
indent = 2,
|
|
1898
1896
|
quotes = "single"
|
|
1899
|
-
} =
|
|
1897
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
1900
1898
|
const [
|
|
1901
1899
|
pluginSvelte,
|
|
1902
1900
|
parserSvelte
|
|
@@ -2019,6 +2017,7 @@ async function test(options = {}) {
|
|
|
2019
2017
|
name: "vinicunca/test/rules",
|
|
2020
2018
|
rules: {
|
|
2021
2019
|
"node/prefer-global/process": OFF,
|
|
2020
|
+
"sonar/no-duplicate-string": OFF,
|
|
2022
2021
|
"test/consistent-test-it": [ERROR, { fn: "it", withinDescribe: "it" }],
|
|
2023
2022
|
"test/no-identical-title": ERROR,
|
|
2024
2023
|
"test/no-only-tests": isInEditor ? OFF : ERROR,
|
|
@@ -2039,7 +2038,7 @@ async function toml(options = {}) {
|
|
|
2039
2038
|
} = options;
|
|
2040
2039
|
const {
|
|
2041
2040
|
indent = 2
|
|
2042
|
-
} =
|
|
2041
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
2043
2042
|
const [
|
|
2044
2043
|
pluginToml,
|
|
2045
2044
|
parserToml
|
|
@@ -2347,7 +2346,7 @@ async function vue(options = {}) {
|
|
|
2347
2346
|
const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
|
|
2348
2347
|
const {
|
|
2349
2348
|
indent = 2
|
|
2350
|
-
} =
|
|
2349
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
2351
2350
|
const [
|
|
2352
2351
|
pluginVue,
|
|
2353
2352
|
parserVue,
|
|
@@ -2517,7 +2516,7 @@ async function yaml(options = {}) {
|
|
|
2517
2516
|
const {
|
|
2518
2517
|
indent = 2,
|
|
2519
2518
|
quotes = "single"
|
|
2520
|
-
} =
|
|
2519
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
2521
2520
|
const [
|
|
2522
2521
|
pluginYaml,
|
|
2523
2522
|
parserYaml
|
|
@@ -2637,7 +2636,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2637
2636
|
}
|
|
2638
2637
|
const configs2 = [];
|
|
2639
2638
|
if (enableGitignore) {
|
|
2640
|
-
if (!
|
|
2639
|
+
if (!e2(enableGitignore)) {
|
|
2641
2640
|
configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2({
|
|
2642
2641
|
name: "vinicunca/gitignore",
|
|
2643
2642
|
...enableGitignore
|
|
@@ -2695,7 +2694,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2695
2694
|
}));
|
|
2696
2695
|
}
|
|
2697
2696
|
if (enableRegexp) {
|
|
2698
|
-
configs2.push(regexp(
|
|
2697
|
+
configs2.push(regexp(e2(enableRegexp) ? {} : enableRegexp));
|
|
2699
2698
|
}
|
|
2700
2699
|
if (options.test ?? true) {
|
|
2701
2700
|
configs2.push(test({
|
|
@@ -2779,7 +2778,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2779
2778
|
if (options.formatters) {
|
|
2780
2779
|
configs2.push(formatters(
|
|
2781
2780
|
options.formatters,
|
|
2782
|
-
|
|
2781
|
+
e2(stylisticOptions) ? {} : stylisticOptions
|
|
2783
2782
|
));
|
|
2784
2783
|
}
|
|
2785
2784
|
if ("files" in options) {
|
|
@@ -2813,7 +2812,7 @@ function getOverrides(options, key) {
|
|
|
2813
2812
|
};
|
|
2814
2813
|
}
|
|
2815
2814
|
function resolveSubOptions(options, key) {
|
|
2816
|
-
return
|
|
2815
|
+
return e2(options[key]) ? {} : options[key] || {};
|
|
2817
2816
|
}
|
|
2818
2817
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2819
2818
|
0 && (module.exports = {
|