@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.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
// ../node_modules/.pnpm/@vinicunca+perkakas@1.0
|
|
2
|
-
function r(
|
|
3
|
-
if (typeof
|
|
4
|
-
let
|
|
5
|
-
return
|
|
1
|
+
// ../node_modules/.pnpm/@vinicunca+perkakas@1.1.0/node_modules/@vinicunca/perkakas/dist/chunk-6AFNPQW2.js
|
|
2
|
+
function r(o) {
|
|
3
|
+
if (typeof o != "object" || o === null) return false;
|
|
4
|
+
let e3 = Object.getPrototypeOf(o);
|
|
5
|
+
return e3 === null || e3 === Object.prototype;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
// ../node_modules/.pnpm/@vinicunca+perkakas@1.0
|
|
9
|
-
function e(
|
|
10
|
-
return typeof
|
|
8
|
+
// ../node_modules/.pnpm/@vinicunca+perkakas@1.1.0/node_modules/@vinicunca/perkakas/dist/chunk-Q2HW4RVT.js
|
|
9
|
+
function e(r2) {
|
|
10
|
+
return typeof r2 == "number" && !Number.isNaN(r2);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
// ../node_modules/.pnpm/@vinicunca+perkakas@1.0
|
|
14
|
-
function e2(
|
|
15
|
-
return typeof
|
|
13
|
+
// ../node_modules/.pnpm/@vinicunca+perkakas@1.1.0/node_modules/@vinicunca/perkakas/dist/chunk-AZUJCNUP.js
|
|
14
|
+
function e2(o) {
|
|
15
|
+
return typeof o == "boolean";
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
// src/base.ts
|
|
@@ -419,7 +419,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
419
419
|
endOfLine: "auto",
|
|
420
420
|
semi,
|
|
421
421
|
singleQuote: quotes === "single",
|
|
422
|
-
tabWidth:
|
|
422
|
+
tabWidth: e(indent) ? indent : 2,
|
|
423
423
|
trailingComma: "all",
|
|
424
424
|
useTabs: indent === "tab"
|
|
425
425
|
},
|
|
@@ -433,7 +433,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
433
433
|
};
|
|
434
434
|
const dprintOptions = Object.assign(
|
|
435
435
|
{
|
|
436
|
-
indentWidth:
|
|
436
|
+
indentWidth: e(indent) ? indent : 2,
|
|
437
437
|
quoteStyle: quotes === "single" ? "preferSingle" : "preferDouble",
|
|
438
438
|
useTabs: indent === "tab"
|
|
439
439
|
},
|
|
@@ -1030,7 +1030,7 @@ async function jsonc(options = {}) {
|
|
|
1030
1030
|
} = options;
|
|
1031
1031
|
const {
|
|
1032
1032
|
indent = 2
|
|
1033
|
-
} =
|
|
1033
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
1034
1034
|
const [
|
|
1035
1035
|
pluginJsonc,
|
|
1036
1036
|
parserJsonc
|
|
@@ -1253,7 +1253,10 @@ async function perfectionist() {
|
|
|
1253
1253
|
ERROR,
|
|
1254
1254
|
{ order: "asc", type: "natural" }
|
|
1255
1255
|
],
|
|
1256
|
-
"perfectionist/sort-vue-attributes": [OFF]
|
|
1256
|
+
"perfectionist/sort-vue-attributes": [OFF],
|
|
1257
|
+
"perfectionist/sort-objects": OFF,
|
|
1258
|
+
"perfectionist/sort-object-types": OFF,
|
|
1259
|
+
"perfectionist/sort-interfaces": OFF
|
|
1257
1260
|
}
|
|
1258
1261
|
}
|
|
1259
1262
|
];
|
|
@@ -1775,7 +1778,7 @@ async function svelte(options = {}) {
|
|
|
1775
1778
|
const {
|
|
1776
1779
|
indent = 2,
|
|
1777
1780
|
quotes = "single"
|
|
1778
|
-
} =
|
|
1781
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
1779
1782
|
const [
|
|
1780
1783
|
pluginSvelte,
|
|
1781
1784
|
parserSvelte
|
|
@@ -1918,7 +1921,7 @@ async function toml(options = {}) {
|
|
|
1918
1921
|
} = options;
|
|
1919
1922
|
const {
|
|
1920
1923
|
indent = 2
|
|
1921
|
-
} =
|
|
1924
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
1922
1925
|
const [
|
|
1923
1926
|
pluginToml,
|
|
1924
1927
|
parserToml
|
|
@@ -2226,7 +2229,7 @@ async function vue(options = {}) {
|
|
|
2226
2229
|
const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
|
|
2227
2230
|
const {
|
|
2228
2231
|
indent = 2
|
|
2229
|
-
} =
|
|
2232
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
2230
2233
|
const [
|
|
2231
2234
|
pluginVue,
|
|
2232
2235
|
parserVue,
|
|
@@ -2396,7 +2399,7 @@ async function yaml(options = {}) {
|
|
|
2396
2399
|
const {
|
|
2397
2400
|
indent = 2,
|
|
2398
2401
|
quotes = "single"
|
|
2399
|
-
} =
|
|
2402
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
2400
2403
|
const [
|
|
2401
2404
|
pluginYaml,
|
|
2402
2405
|
parserYaml
|
|
@@ -2441,6 +2444,12 @@ async function yaml(options = {}) {
|
|
|
2441
2444
|
} : {},
|
|
2442
2445
|
...overrides
|
|
2443
2446
|
}
|
|
2447
|
+
},
|
|
2448
|
+
{
|
|
2449
|
+
files: ["pnpm-workspace.yaml"],
|
|
2450
|
+
rules: {
|
|
2451
|
+
"yaml/sort-keys": ERROR
|
|
2452
|
+
}
|
|
2444
2453
|
}
|
|
2445
2454
|
];
|
|
2446
2455
|
}
|
|
@@ -2510,7 +2519,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2510
2519
|
}
|
|
2511
2520
|
const configs2 = [];
|
|
2512
2521
|
if (enableGitignore) {
|
|
2513
|
-
if (!
|
|
2522
|
+
if (!e2(enableGitignore)) {
|
|
2514
2523
|
configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2({
|
|
2515
2524
|
name: "vinicunca/gitignore",
|
|
2516
2525
|
...enableGitignore
|
|
@@ -2568,7 +2577,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2568
2577
|
}));
|
|
2569
2578
|
}
|
|
2570
2579
|
if (enableRegexp) {
|
|
2571
|
-
configs2.push(regexp(
|
|
2580
|
+
configs2.push(regexp(e2(enableRegexp) ? {} : enableRegexp));
|
|
2572
2581
|
}
|
|
2573
2582
|
if (options.test ?? true) {
|
|
2574
2583
|
configs2.push(test({
|
|
@@ -2652,7 +2661,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2652
2661
|
if (options.formatters) {
|
|
2653
2662
|
configs2.push(formatters(
|
|
2654
2663
|
options.formatters,
|
|
2655
|
-
|
|
2664
|
+
e2(stylisticOptions) ? {} : stylisticOptions
|
|
2656
2665
|
));
|
|
2657
2666
|
}
|
|
2658
2667
|
if ("files" in options) {
|
|
@@ -2686,7 +2695,7 @@ function getOverrides(options, key) {
|
|
|
2686
2695
|
};
|
|
2687
2696
|
}
|
|
2688
2697
|
function resolveSubOptions(options, key) {
|
|
2689
|
-
return
|
|
2698
|
+
return e2(options[key]) ? {} : options[key] || {};
|
|
2690
2699
|
}
|
|
2691
2700
|
export {
|
|
2692
2701
|
GLOB_ALL_SRC,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vinicunca/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.15.
|
|
4
|
+
"version": "2.15.2",
|
|
5
5
|
"description": "Vinicunca ESLint config",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "praburangki",
|
|
@@ -114,25 +114,25 @@
|
|
|
114
114
|
"@clack/prompts": "^0.8.2",
|
|
115
115
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
116
116
|
"@eslint/markdown": "^6.2.1",
|
|
117
|
-
"@stylistic/eslint-plugin": "^2.
|
|
118
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
119
|
-
"@typescript-eslint/parser": "^8.
|
|
120
|
-
"@unocss/eslint-plugin": "^0.65.
|
|
121
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
117
|
+
"@stylistic/eslint-plugin": "^2.12.1",
|
|
118
|
+
"@typescript-eslint/eslint-plugin": "^8.18.1",
|
|
119
|
+
"@typescript-eslint/parser": "^8.18.1",
|
|
120
|
+
"@unocss/eslint-plugin": "^0.65.1",
|
|
121
|
+
"@vitest/eslint-plugin": "^1.1.16",
|
|
122
122
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
123
123
|
"eslint-flat-config-utils": "^0.4.0",
|
|
124
124
|
"eslint-merge-processors": "^0.1.0",
|
|
125
125
|
"eslint-plugin-antfu": "^2.7.0",
|
|
126
126
|
"eslint-plugin-command": "^0.2.6",
|
|
127
127
|
"eslint-plugin-format": "^0.1.3",
|
|
128
|
-
"eslint-plugin-import-x": "^4.
|
|
129
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
128
|
+
"eslint-plugin-import-x": "^4.5.0",
|
|
129
|
+
"eslint-plugin-jsdoc": "^50.6.1",
|
|
130
130
|
"eslint-plugin-jsonc": "^2.18.2",
|
|
131
|
-
"eslint-plugin-n": "^17.
|
|
131
|
+
"eslint-plugin-n": "^17.15.0",
|
|
132
132
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
133
|
-
"eslint-plugin-perfectionist": "^4.
|
|
133
|
+
"eslint-plugin-perfectionist": "^4.3.0",
|
|
134
134
|
"eslint-plugin-regexp": "^2.7.0",
|
|
135
|
-
"eslint-plugin-sonarjs": "^3.0.
|
|
135
|
+
"eslint-plugin-sonarjs": "^3.0.1",
|
|
136
136
|
"eslint-plugin-toml": "^0.12.0",
|
|
137
137
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
138
138
|
"eslint-plugin-unused-imports": "^4.1.4",
|