@vinicunca/eslint-config 2.15.0 → 2.15.2
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 +33 -24
- package/dist/index.d.cts +220 -104
- package/dist/index.d.ts +220 -104
- package/dist/index.js +32 -23
- 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
|
|
@@ -1371,7 +1371,10 @@ async function perfectionist() {
|
|
|
1371
1371
|
ERROR,
|
|
1372
1372
|
{ order: "asc", type: "natural" }
|
|
1373
1373
|
],
|
|
1374
|
-
"perfectionist/sort-vue-attributes": [OFF]
|
|
1374
|
+
"perfectionist/sort-vue-attributes": [OFF],
|
|
1375
|
+
"perfectionist/sort-objects": OFF,
|
|
1376
|
+
"perfectionist/sort-object-types": OFF,
|
|
1377
|
+
"perfectionist/sort-interfaces": OFF
|
|
1375
1378
|
}
|
|
1376
1379
|
}
|
|
1377
1380
|
];
|
|
@@ -1893,7 +1896,7 @@ async function svelte(options = {}) {
|
|
|
1893
1896
|
const {
|
|
1894
1897
|
indent = 2,
|
|
1895
1898
|
quotes = "single"
|
|
1896
|
-
} =
|
|
1899
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
1897
1900
|
const [
|
|
1898
1901
|
pluginSvelte,
|
|
1899
1902
|
parserSvelte
|
|
@@ -2036,7 +2039,7 @@ async function toml(options = {}) {
|
|
|
2036
2039
|
} = options;
|
|
2037
2040
|
const {
|
|
2038
2041
|
indent = 2
|
|
2039
|
-
} =
|
|
2042
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
2040
2043
|
const [
|
|
2041
2044
|
pluginToml,
|
|
2042
2045
|
parserToml
|
|
@@ -2344,7 +2347,7 @@ async function vue(options = {}) {
|
|
|
2344
2347
|
const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
|
|
2345
2348
|
const {
|
|
2346
2349
|
indent = 2
|
|
2347
|
-
} =
|
|
2350
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
2348
2351
|
const [
|
|
2349
2352
|
pluginVue,
|
|
2350
2353
|
parserVue,
|
|
@@ -2514,7 +2517,7 @@ async function yaml(options = {}) {
|
|
|
2514
2517
|
const {
|
|
2515
2518
|
indent = 2,
|
|
2516
2519
|
quotes = "single"
|
|
2517
|
-
} =
|
|
2520
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
2518
2521
|
const [
|
|
2519
2522
|
pluginYaml,
|
|
2520
2523
|
parserYaml
|
|
@@ -2559,6 +2562,12 @@ async function yaml(options = {}) {
|
|
|
2559
2562
|
} : {},
|
|
2560
2563
|
...overrides
|
|
2561
2564
|
}
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
files: ["pnpm-workspace.yaml"],
|
|
2568
|
+
rules: {
|
|
2569
|
+
"yaml/sort-keys": ERROR
|
|
2570
|
+
}
|
|
2562
2571
|
}
|
|
2563
2572
|
];
|
|
2564
2573
|
}
|
|
@@ -2628,7 +2637,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2628
2637
|
}
|
|
2629
2638
|
const configs2 = [];
|
|
2630
2639
|
if (enableGitignore) {
|
|
2631
|
-
if (!
|
|
2640
|
+
if (!e2(enableGitignore)) {
|
|
2632
2641
|
configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2({
|
|
2633
2642
|
name: "vinicunca/gitignore",
|
|
2634
2643
|
...enableGitignore
|
|
@@ -2686,7 +2695,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2686
2695
|
}));
|
|
2687
2696
|
}
|
|
2688
2697
|
if (enableRegexp) {
|
|
2689
|
-
configs2.push(regexp(
|
|
2698
|
+
configs2.push(regexp(e2(enableRegexp) ? {} : enableRegexp));
|
|
2690
2699
|
}
|
|
2691
2700
|
if (options.test ?? true) {
|
|
2692
2701
|
configs2.push(test({
|
|
@@ -2770,7 +2779,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2770
2779
|
if (options.formatters) {
|
|
2771
2780
|
configs2.push(formatters(
|
|
2772
2781
|
options.formatters,
|
|
2773
|
-
|
|
2782
|
+
e2(stylisticOptions) ? {} : stylisticOptions
|
|
2774
2783
|
));
|
|
2775
2784
|
}
|
|
2776
2785
|
if ("files" in options) {
|
|
@@ -2804,7 +2813,7 @@ function getOverrides(options, key) {
|
|
|
2804
2813
|
};
|
|
2805
2814
|
}
|
|
2806
2815
|
function resolveSubOptions(options, key) {
|
|
2807
|
-
return
|
|
2816
|
+
return e2(options[key]) ? {} : options[key] || {};
|
|
2808
2817
|
}
|
|
2809
2818
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2810
2819
|
0 && (module.exports = {
|