@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.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
|
|
@@ -1221,7 +1221,6 @@ async function perfectionist() {
|
|
|
1221
1221
|
perfectionist: default5
|
|
1222
1222
|
},
|
|
1223
1223
|
rules: {
|
|
1224
|
-
...default5.configs["recommended-natural"].rules,
|
|
1225
1224
|
"perfectionist/sort-exports": [
|
|
1226
1225
|
ERROR,
|
|
1227
1226
|
{ order: "asc", type: "natural" }
|
|
@@ -1252,11 +1251,7 @@ async function perfectionist() {
|
|
|
1252
1251
|
"perfectionist/sort-named-imports": [
|
|
1253
1252
|
ERROR,
|
|
1254
1253
|
{ order: "asc", type: "natural" }
|
|
1255
|
-
]
|
|
1256
|
-
"perfectionist/sort-vue-attributes": [OFF],
|
|
1257
|
-
"perfectionist/sort-objects": OFF,
|
|
1258
|
-
"perfectionist/sort-object-types": OFF,
|
|
1259
|
-
"perfectionist/sort-interfaces": OFF
|
|
1254
|
+
]
|
|
1260
1255
|
}
|
|
1261
1256
|
}
|
|
1262
1257
|
];
|
|
@@ -1529,7 +1524,10 @@ async function sonar() {
|
|
|
1529
1524
|
rules: {
|
|
1530
1525
|
...default6.configs.recommended.rules,
|
|
1531
1526
|
"sonar/todo-tag": OFF,
|
|
1532
|
-
"sonar/pseudo-random": OFF
|
|
1527
|
+
"sonar/pseudo-random": OFF,
|
|
1528
|
+
"sonar/slow-regex": OFF,
|
|
1529
|
+
"sonar/cognitive-complexity": OFF,
|
|
1530
|
+
"sonar/no-unused-vars": OFF
|
|
1533
1531
|
}
|
|
1534
1532
|
}
|
|
1535
1533
|
];
|
|
@@ -1778,7 +1776,7 @@ async function svelte(options = {}) {
|
|
|
1778
1776
|
const {
|
|
1779
1777
|
indent = 2,
|
|
1780
1778
|
quotes = "single"
|
|
1781
|
-
} =
|
|
1779
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
1782
1780
|
const [
|
|
1783
1781
|
pluginSvelte,
|
|
1784
1782
|
parserSvelte
|
|
@@ -1901,6 +1899,7 @@ async function test(options = {}) {
|
|
|
1901
1899
|
name: "vinicunca/test/rules",
|
|
1902
1900
|
rules: {
|
|
1903
1901
|
"node/prefer-global/process": OFF,
|
|
1902
|
+
"sonar/no-duplicate-string": OFF,
|
|
1904
1903
|
"test/consistent-test-it": [ERROR, { fn: "it", withinDescribe: "it" }],
|
|
1905
1904
|
"test/no-identical-title": ERROR,
|
|
1906
1905
|
"test/no-only-tests": isInEditor ? OFF : ERROR,
|
|
@@ -1921,7 +1920,7 @@ async function toml(options = {}) {
|
|
|
1921
1920
|
} = options;
|
|
1922
1921
|
const {
|
|
1923
1922
|
indent = 2
|
|
1924
|
-
} =
|
|
1923
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
1925
1924
|
const [
|
|
1926
1925
|
pluginToml,
|
|
1927
1926
|
parserToml
|
|
@@ -2229,7 +2228,7 @@ async function vue(options = {}) {
|
|
|
2229
2228
|
const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
|
|
2230
2229
|
const {
|
|
2231
2230
|
indent = 2
|
|
2232
|
-
} =
|
|
2231
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
2233
2232
|
const [
|
|
2234
2233
|
pluginVue,
|
|
2235
2234
|
parserVue,
|
|
@@ -2399,7 +2398,7 @@ async function yaml(options = {}) {
|
|
|
2399
2398
|
const {
|
|
2400
2399
|
indent = 2,
|
|
2401
2400
|
quotes = "single"
|
|
2402
|
-
} =
|
|
2401
|
+
} = e2(stylistic2) ? {} : stylistic2;
|
|
2403
2402
|
const [
|
|
2404
2403
|
pluginYaml,
|
|
2405
2404
|
parserYaml
|
|
@@ -2519,7 +2518,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2519
2518
|
}
|
|
2520
2519
|
const configs2 = [];
|
|
2521
2520
|
if (enableGitignore) {
|
|
2522
|
-
if (!
|
|
2521
|
+
if (!e2(enableGitignore)) {
|
|
2523
2522
|
configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2({
|
|
2524
2523
|
name: "vinicunca/gitignore",
|
|
2525
2524
|
...enableGitignore
|
|
@@ -2577,7 +2576,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2577
2576
|
}));
|
|
2578
2577
|
}
|
|
2579
2578
|
if (enableRegexp) {
|
|
2580
|
-
configs2.push(regexp(
|
|
2579
|
+
configs2.push(regexp(e2(enableRegexp) ? {} : enableRegexp));
|
|
2581
2580
|
}
|
|
2582
2581
|
if (options.test ?? true) {
|
|
2583
2582
|
configs2.push(test({
|
|
@@ -2661,7 +2660,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2661
2660
|
if (options.formatters) {
|
|
2662
2661
|
configs2.push(formatters(
|
|
2663
2662
|
options.formatters,
|
|
2664
|
-
|
|
2663
|
+
e2(stylisticOptions) ? {} : stylisticOptions
|
|
2665
2664
|
));
|
|
2666
2665
|
}
|
|
2667
2666
|
if ("files" in options) {
|
|
@@ -2695,7 +2694,7 @@ function getOverrides(options, key) {
|
|
|
2695
2694
|
};
|
|
2696
2695
|
}
|
|
2697
2696
|
function resolveSubOptions(options, key) {
|
|
2698
|
-
return
|
|
2697
|
+
return e2(options[key]) ? {} : options[key] || {};
|
|
2699
2698
|
}
|
|
2700
2699
|
export {
|
|
2701
2700
|
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.3",
|
|
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",
|