@ntnyq/eslint-config 3.8.0 → 3.9.0
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 +19 -38
- package/dist/index.cjs +83 -16
- package/dist/index.d.cts +6343 -4061
- package/dist/index.d.ts +6343 -4061
- package/dist/index.js +148 -84
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -36,25 +36,27 @@ var parserPlain = {
|
|
|
36
36
|
import * as pluginRegexp from "eslint-plugin-regexp";
|
|
37
37
|
import { default as default2 } from "eslint-plugin-n";
|
|
38
38
|
import { default as default3 } from "eslint-plugin-vue";
|
|
39
|
-
import { default as default4 } from "eslint-plugin-
|
|
40
|
-
import { default as default5 } from "eslint-plugin-
|
|
41
|
-
import { default as default6 } from "eslint-plugin-
|
|
42
|
-
import { default as default7 } from "
|
|
43
|
-
import { default as default8 } from "eslint-plugin-
|
|
44
|
-
import { default as default9 } from "eslint
|
|
45
|
-
import { default as default10 } from "eslint-plugin-
|
|
39
|
+
import { default as default4 } from "eslint-plugin-es-x";
|
|
40
|
+
import { default as default5 } from "eslint-plugin-yml";
|
|
41
|
+
import { default as default6 } from "eslint-plugin-toml";
|
|
42
|
+
import { default as default7 } from "eslint-plugin-pinia";
|
|
43
|
+
import { default as default8 } from "eslint-plugin-ntnyq";
|
|
44
|
+
import { default as default9 } from "@eslint/markdown";
|
|
45
|
+
import { default as default10 } from "eslint-plugin-antfu";
|
|
46
|
+
import { default as default11 } from "eslint-plugin-jsdoc";
|
|
47
|
+
import { default as default12 } from "eslint-plugin-jsonc";
|
|
46
48
|
import { plugin } from "typescript-eslint";
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
49
|
+
import { default as default13 } from "eslint-plugin-format";
|
|
50
|
+
import { default as default14 } from "@unocss/eslint-plugin";
|
|
51
|
+
import { default as default15 } from "@vitest/eslint-plugin";
|
|
52
|
+
import { default as default16 } from "eslint-plugin-unicorn";
|
|
53
|
+
import { default as default17 } from "eslint-plugin-import-x";
|
|
54
|
+
import { default as default18 } from "eslint-plugin-prettier";
|
|
55
|
+
import { default as default19 } from "@stylistic/eslint-plugin";
|
|
56
|
+
import { default as default20 } from "eslint-plugin-github-action";
|
|
57
|
+
import { default as default21 } from "eslint-plugin-perfectionist";
|
|
58
|
+
import { default as default22 } from "eslint-plugin-unused-imports";
|
|
59
|
+
import { default as default23 } from "@eslint-community/eslint-plugin-eslint-comments";
|
|
58
60
|
|
|
59
61
|
// src/eslint/configs.ts
|
|
60
62
|
import { configs } from "typescript-eslint";
|
|
@@ -62,7 +64,7 @@ import { configs } from "typescript-eslint";
|
|
|
62
64
|
// src/eslint/processors.ts
|
|
63
65
|
import { mergeProcessors } from "eslint-merge-processors";
|
|
64
66
|
import { processorPassThrough } from "eslint-merge-processors";
|
|
65
|
-
import { default as
|
|
67
|
+
import { default as default24 } from "eslint-processor-vue-blocks";
|
|
66
68
|
|
|
67
69
|
// src/globs.ts
|
|
68
70
|
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
@@ -108,6 +110,7 @@ var GLOB_ALL_SRC = [
|
|
|
108
110
|
GLOB_HTML,
|
|
109
111
|
GLOB_MARKDOWN
|
|
110
112
|
];
|
|
113
|
+
var GLOB_PINIA_STORE = `**/store?(s)/*.${GLOB_SRC_EXT}`;
|
|
111
114
|
var GLOB_GITHUB_ACTION = "**/.github/workflows/*.y?(a)ml";
|
|
112
115
|
var GLOB_NODE_MODULES = "**/node_modules/**";
|
|
113
116
|
var GLOB_DIST = "**/dist/**";
|
|
@@ -260,7 +263,7 @@ var unCategorizedRules = {
|
|
|
260
263
|
"vue/next-tick-style": ["error", "promise"],
|
|
261
264
|
"vue/v-for-delimiter-style": ["error", "in"],
|
|
262
265
|
"vue/no-restricted-v-bind": ["error", "/^v-/"],
|
|
263
|
-
"vue/slot-name-casing": ["error", "
|
|
266
|
+
"vue/slot-name-casing": ["error", "kebab-case"],
|
|
264
267
|
"vue/custom-event-name-casing": ["error", "camelCase"],
|
|
265
268
|
"vue/define-props-declaration": ["error", "type-based"],
|
|
266
269
|
"vue/define-emits-declaration": ["error", "type-literal"],
|
|
@@ -371,7 +374,7 @@ var vue = (options = {}) => {
|
|
|
371
374
|
if (!sfcBlocks) return processorVueSFC;
|
|
372
375
|
return mergeProcessors2([
|
|
373
376
|
processorVueSFC,
|
|
374
|
-
|
|
377
|
+
default24({
|
|
375
378
|
...sfcBlocks,
|
|
376
379
|
blocks: {
|
|
377
380
|
styles: true,
|
|
@@ -526,11 +529,11 @@ var yml = (options = {}) => [
|
|
|
526
529
|
parser: parserYaml
|
|
527
530
|
},
|
|
528
531
|
plugins: {
|
|
529
|
-
yml:
|
|
532
|
+
yml: default5
|
|
530
533
|
},
|
|
531
534
|
rules: {
|
|
532
|
-
...
|
|
533
|
-
...
|
|
535
|
+
...default5.configs.standard.rules,
|
|
536
|
+
...default5.configs.prettier.rules,
|
|
534
537
|
"yml/no-empty-mapping-value": "off",
|
|
535
538
|
"yml/quotes": ["error", { avoidEscape: false, prefer: "single" }],
|
|
536
539
|
// Overrides rules
|
|
@@ -539,6 +542,20 @@ var yml = (options = {}) => [
|
|
|
539
542
|
}
|
|
540
543
|
];
|
|
541
544
|
|
|
545
|
+
// src/configs/esX.ts
|
|
546
|
+
var esX = (options = {}) => [
|
|
547
|
+
{
|
|
548
|
+
name: "ntnyq/es-x",
|
|
549
|
+
plugins: {
|
|
550
|
+
"es-x": default4
|
|
551
|
+
},
|
|
552
|
+
rules: {
|
|
553
|
+
// Overrides rules
|
|
554
|
+
...options.overrides
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
];
|
|
558
|
+
|
|
542
559
|
// src/configs/node.ts
|
|
543
560
|
var node = (options = {}) => [
|
|
544
561
|
{
|
|
@@ -911,7 +928,7 @@ var toml = (options = {}) => [
|
|
|
911
928
|
parser: parserToml
|
|
912
929
|
},
|
|
913
930
|
plugins: {
|
|
914
|
-
toml:
|
|
931
|
+
toml: default6
|
|
915
932
|
},
|
|
916
933
|
rules: {
|
|
917
934
|
"toml/keys-order": "error",
|
|
@@ -956,11 +973,11 @@ var vitest = (options = {}) => [
|
|
|
956
973
|
{
|
|
957
974
|
name: "ntnyq/vitest",
|
|
958
975
|
plugins: {
|
|
959
|
-
vitest:
|
|
976
|
+
vitest: default15
|
|
960
977
|
},
|
|
961
978
|
files: [...GLOB_TEST],
|
|
962
979
|
rules: {
|
|
963
|
-
...
|
|
980
|
+
...default15.configs.recommended.rules,
|
|
964
981
|
// Overrides rules
|
|
965
982
|
...options.overridesVitestRules
|
|
966
983
|
}
|
|
@@ -972,7 +989,7 @@ var antfu = (options = {}) => [
|
|
|
972
989
|
{
|
|
973
990
|
name: "ntnyq/antfu",
|
|
974
991
|
plugins: {
|
|
975
|
-
antfu:
|
|
992
|
+
antfu: default10
|
|
976
993
|
},
|
|
977
994
|
rules: {
|
|
978
995
|
// required `object-curly-newline` to be disabled
|
|
@@ -999,7 +1016,7 @@ var jsdoc = (options = {}) => [
|
|
|
999
1016
|
{
|
|
1000
1017
|
name: "ntnyq/jsdoc",
|
|
1001
1018
|
plugins: {
|
|
1002
|
-
jsdoc:
|
|
1019
|
+
jsdoc: default11
|
|
1003
1020
|
},
|
|
1004
1021
|
rules: {
|
|
1005
1022
|
// Disabled rules
|
|
@@ -1221,13 +1238,13 @@ var jsonc = (options = {}) => [
|
|
|
1221
1238
|
name: "ntnyq/jsonc",
|
|
1222
1239
|
files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
|
|
1223
1240
|
plugins: {
|
|
1224
|
-
jsonc:
|
|
1241
|
+
jsonc: default12
|
|
1225
1242
|
},
|
|
1226
1243
|
languageOptions: {
|
|
1227
1244
|
parser: parserJsonc
|
|
1228
1245
|
},
|
|
1229
1246
|
rules: {
|
|
1230
|
-
...
|
|
1247
|
+
...default12.configs["recommended-with-jsonc"].rules,
|
|
1231
1248
|
"jsonc/no-octal-escape": "error",
|
|
1232
1249
|
"jsonc/indent": ["error", 2],
|
|
1233
1250
|
"jsonc/comma-style": ["error", "last"],
|
|
@@ -1260,12 +1277,43 @@ var jsonc = (options = {}) => [
|
|
|
1260
1277
|
}
|
|
1261
1278
|
];
|
|
1262
1279
|
|
|
1280
|
+
// src/configs/pinia.ts
|
|
1281
|
+
var pinia = (options = {}) => {
|
|
1282
|
+
const { files = [GLOB_PINIA_STORE] } = options;
|
|
1283
|
+
return [
|
|
1284
|
+
{
|
|
1285
|
+
name: "ntnyq/pinia",
|
|
1286
|
+
files,
|
|
1287
|
+
plugins: {
|
|
1288
|
+
pinia: default7
|
|
1289
|
+
},
|
|
1290
|
+
rules: {
|
|
1291
|
+
"pinia/prefer-single-store-per-file": "error",
|
|
1292
|
+
"pinia/no-duplicate-store-ids": "error",
|
|
1293
|
+
"pinia/no-return-global-properties": "error",
|
|
1294
|
+
"pinia/no-store-to-refs-in-store": "error",
|
|
1295
|
+
"pinia/never-export-initialized-store": "error",
|
|
1296
|
+
"pinia/require-setup-store-properties-export": "error",
|
|
1297
|
+
"pinia/prefer-use-store-naming-convention": [
|
|
1298
|
+
"error",
|
|
1299
|
+
{
|
|
1300
|
+
checkStoreNameMismatch: true,
|
|
1301
|
+
storeSuffix: "Store"
|
|
1302
|
+
}
|
|
1303
|
+
],
|
|
1304
|
+
// Overrides rules
|
|
1305
|
+
...options.overrides
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
];
|
|
1309
|
+
};
|
|
1310
|
+
|
|
1263
1311
|
// src/configs/ntnyq.ts
|
|
1264
1312
|
var ntnyq = (options = {}) => [
|
|
1265
1313
|
{
|
|
1266
1314
|
name: "ntnyq/ntnyq",
|
|
1267
1315
|
plugins: {
|
|
1268
|
-
ntnyq:
|
|
1316
|
+
ntnyq: default8
|
|
1269
1317
|
},
|
|
1270
1318
|
rules: {
|
|
1271
1319
|
"ntnyq/no-member-accessibility": "error",
|
|
@@ -1281,7 +1329,7 @@ var regexp = (options = {}) => {
|
|
|
1281
1329
|
const recommendedRules2 = {
|
|
1282
1330
|
...recommendedConfig.rules
|
|
1283
1331
|
};
|
|
1284
|
-
if (options.level === "warn") {
|
|
1332
|
+
if (options.severity || options.level === "warn") {
|
|
1285
1333
|
for (const key in recommendedRules2) {
|
|
1286
1334
|
if (recommendedRules2[key] === "error") {
|
|
1287
1335
|
recommendedRules2[key] = "warn";
|
|
@@ -1306,7 +1354,7 @@ var unocss = (options = {}) => [
|
|
|
1306
1354
|
{
|
|
1307
1355
|
name: "ntnyq/unocss",
|
|
1308
1356
|
plugins: {
|
|
1309
|
-
unocss:
|
|
1357
|
+
unocss: default14
|
|
1310
1358
|
},
|
|
1311
1359
|
rules: {
|
|
1312
1360
|
"unocss/order": "error",
|
|
@@ -1375,6 +1423,7 @@ var hasVitest = isPackageExists("vitest");
|
|
|
1375
1423
|
var hasVue = isPackageExists("vue") || isPackageExists("nuxt") || isPackageExists("vitepress") || isPackageExists("@slidev/cli") || isPackageExists("vue", {
|
|
1376
1424
|
paths: [resolve(process.cwd(), "playground")]
|
|
1377
1425
|
});
|
|
1426
|
+
var hasPinia = isPackageExists("pinia");
|
|
1378
1427
|
var hasUnoCSS = isPackageExists("unocss") || isPackageExists("@unocss/postcss") || isPackageExists("@unocss/webpack") || isPackageExists("@unocss/nuxt");
|
|
1379
1428
|
|
|
1380
1429
|
// src/utils/toArray.ts
|
|
@@ -1440,7 +1489,7 @@ var format = (options = {}) => {
|
|
|
1440
1489
|
{
|
|
1441
1490
|
name: "ntnyq/format/setup",
|
|
1442
1491
|
plugins: {
|
|
1443
|
-
format:
|
|
1492
|
+
format: default13
|
|
1444
1493
|
}
|
|
1445
1494
|
}
|
|
1446
1495
|
];
|
|
@@ -1539,7 +1588,7 @@ var importX = (options = {}) => [
|
|
|
1539
1588
|
{
|
|
1540
1589
|
name: "ntnyq/import-x",
|
|
1541
1590
|
plugins: {
|
|
1542
|
-
"import-x":
|
|
1591
|
+
"import-x": default17
|
|
1543
1592
|
},
|
|
1544
1593
|
settings: {
|
|
1545
1594
|
"import-x/resolver": {
|
|
@@ -1580,7 +1629,7 @@ var unicorn = (options = {}) => [
|
|
|
1580
1629
|
{
|
|
1581
1630
|
name: "ntnyq/unicorn",
|
|
1582
1631
|
plugins: {
|
|
1583
|
-
unicorn:
|
|
1632
|
+
unicorn: default16
|
|
1584
1633
|
},
|
|
1585
1634
|
rules: {
|
|
1586
1635
|
"unicorn/escape-case": "error",
|
|
@@ -1702,8 +1751,8 @@ var specials = (options = {}) => [
|
|
|
1702
1751
|
name: "ntnyq/specials/config-file",
|
|
1703
1752
|
files: [`**/*.config*.${GLOB_SRC_EXT}`],
|
|
1704
1753
|
plugins: {
|
|
1705
|
-
"import-x":
|
|
1706
|
-
perfectionist:
|
|
1754
|
+
"import-x": default17,
|
|
1755
|
+
perfectionist: default21
|
|
1707
1756
|
},
|
|
1708
1757
|
rules: {
|
|
1709
1758
|
"no-console": "off",
|
|
@@ -1729,10 +1778,10 @@ var comments = (options = {}) => [
|
|
|
1729
1778
|
{
|
|
1730
1779
|
name: "ntnyq/eslint-comments",
|
|
1731
1780
|
plugins: {
|
|
1732
|
-
"@eslint-community/eslint-comments":
|
|
1781
|
+
"@eslint-community/eslint-comments": default23
|
|
1733
1782
|
},
|
|
1734
1783
|
rules: {
|
|
1735
|
-
...
|
|
1784
|
+
...default23.configs.recommended.rules,
|
|
1736
1785
|
"@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
|
|
1737
1786
|
// Overrides rules
|
|
1738
1787
|
...options.overrides
|
|
@@ -1742,10 +1791,10 @@ var comments = (options = {}) => [
|
|
|
1742
1791
|
|
|
1743
1792
|
// src/configs/markdown.ts
|
|
1744
1793
|
var markdown = (options = {}) => {
|
|
1745
|
-
if (!Array.isArray(
|
|
1794
|
+
if (!Array.isArray(default9.configs?.processor)) return [];
|
|
1746
1795
|
const { files = [`${GLOB_MARKDOWN}/${GLOB_SRC}`], extensions = [] } = options;
|
|
1747
1796
|
return [
|
|
1748
|
-
...
|
|
1797
|
+
...default9.configs.processor.map((config) => ({
|
|
1749
1798
|
...config,
|
|
1750
1799
|
name: `ntnyq/${config.name}`
|
|
1751
1800
|
})),
|
|
@@ -1754,7 +1803,7 @@ var markdown = (options = {}) => {
|
|
|
1754
1803
|
files,
|
|
1755
1804
|
ignores: [GLOB_MARKDOWN_NESTED],
|
|
1756
1805
|
processor: mergeProcessors([
|
|
1757
|
-
|
|
1806
|
+
default9.processors.markdown,
|
|
1758
1807
|
// Just pass through processor
|
|
1759
1808
|
processorPassThrough
|
|
1760
1809
|
])
|
|
@@ -1819,7 +1868,7 @@ var prettier = (options = {}) => {
|
|
|
1819
1868
|
{
|
|
1820
1869
|
name: "ntnyq/prettier",
|
|
1821
1870
|
plugins: {
|
|
1822
|
-
prettier:
|
|
1871
|
+
prettier: default18
|
|
1823
1872
|
},
|
|
1824
1873
|
rules: {
|
|
1825
1874
|
"vue/array-bracket-newline": "off",
|
|
@@ -1859,8 +1908,8 @@ var prettier = (options = {}) => {
|
|
|
1859
1908
|
"vue/space-infix-ops": "off",
|
|
1860
1909
|
"vue/space-unary-ops": "off",
|
|
1861
1910
|
"vue/template-curly-spacing": "off",
|
|
1862
|
-
...
|
|
1863
|
-
"prettier/prettier": options.level || "warn",
|
|
1911
|
+
...default18.configs.recommended.rules,
|
|
1912
|
+
"prettier/prettier": options.severity || options.level || "warn",
|
|
1864
1913
|
// Overrides rules
|
|
1865
1914
|
...options.overrides
|
|
1866
1915
|
}
|
|
@@ -1872,7 +1921,7 @@ var prettier = (options = {}) => {
|
|
|
1872
1921
|
name: "ntnyq/prettier/disabled",
|
|
1873
1922
|
files: [...disabledFiles, ...userDisabledFiles],
|
|
1874
1923
|
plugins: {
|
|
1875
|
-
prettier:
|
|
1924
|
+
prettier: default18
|
|
1876
1925
|
},
|
|
1877
1926
|
rules: {
|
|
1878
1927
|
"prettier/prettier": "off"
|
|
@@ -1886,7 +1935,7 @@ var stylistic = (options = {}) => [
|
|
|
1886
1935
|
{
|
|
1887
1936
|
name: "ntnyq/stylistic",
|
|
1888
1937
|
plugins: {
|
|
1889
|
-
"@stylistic":
|
|
1938
|
+
"@stylistic": default19
|
|
1890
1939
|
},
|
|
1891
1940
|
rules: {
|
|
1892
1941
|
// Only rules are not conflicted with Prettier
|
|
@@ -2220,7 +2269,7 @@ var typescript = (options = {}) => {
|
|
|
2220
2269
|
name: "ntnyq/ts/setup",
|
|
2221
2270
|
plugins: {
|
|
2222
2271
|
"@typescript-eslint": plugin,
|
|
2223
|
-
antfu:
|
|
2272
|
+
antfu: default10
|
|
2224
2273
|
}
|
|
2225
2274
|
},
|
|
2226
2275
|
...enableTypeAwareLint ? [
|
|
@@ -2367,7 +2416,7 @@ var githubAction = (options = {}) => {
|
|
|
2367
2416
|
};
|
|
2368
2417
|
|
|
2369
2418
|
// src/configs/perfectionist.ts
|
|
2370
|
-
var
|
|
2419
|
+
var sharedGroupsForInterfaceOrObjectTypes = [
|
|
2371
2420
|
"required-property",
|
|
2372
2421
|
"optional-property",
|
|
2373
2422
|
"required-method",
|
|
@@ -2380,9 +2429,7 @@ var sharedGroups = [
|
|
|
2380
2429
|
"index-signature",
|
|
2381
2430
|
"multiline-index-signature"
|
|
2382
2431
|
];
|
|
2383
|
-
var
|
|
2384
|
-
var defaultSortObjectTypesGroups = [...sharedGroups];
|
|
2385
|
-
var defaultSortIntersectionTypesGroups = [
|
|
2432
|
+
var sharedGroupsForIntersectionOrUnion = [
|
|
2386
2433
|
/**
|
|
2387
2434
|
* eg. 'foobar', 24, false
|
|
2388
2435
|
*/
|
|
@@ -2432,6 +2479,10 @@ var defaultSortIntersectionTypesGroups = [
|
|
|
2432
2479
|
*/
|
|
2433
2480
|
"nullish"
|
|
2434
2481
|
];
|
|
2482
|
+
var defaultSortInterfacesGroups = [...sharedGroupsForInterfaceOrObjectTypes];
|
|
2483
|
+
var defaultSortObjectTypesGroups = [...sharedGroupsForInterfaceOrObjectTypes];
|
|
2484
|
+
var defaultSortIntersectionTypesGroups = [...sharedGroupsForIntersectionOrUnion];
|
|
2485
|
+
var defaultSortUnionTypesGroups = [...sharedGroupsForIntersectionOrUnion];
|
|
2435
2486
|
var perfectionist = (options = {}) => {
|
|
2436
2487
|
const {
|
|
2437
2488
|
sortEnums: enableSortEnums = true,
|
|
@@ -2442,7 +2493,7 @@ var perfectionist = (options = {}) => {
|
|
|
2442
2493
|
{
|
|
2443
2494
|
name: "ntnyq/perfectionist/common",
|
|
2444
2495
|
plugins: {
|
|
2445
|
-
perfectionist:
|
|
2496
|
+
perfectionist: default21
|
|
2446
2497
|
},
|
|
2447
2498
|
rules: {
|
|
2448
2499
|
"perfectionist/sort-imports": [
|
|
@@ -2527,7 +2578,7 @@ var perfectionist = (options = {}) => {
|
|
|
2527
2578
|
name: "ntnyq/perfectionist/enums",
|
|
2528
2579
|
files: [`**/enums/${GLOB_SRC}`, `**/enums.${GLOB_SRC_EXT}`],
|
|
2529
2580
|
plugins: {
|
|
2530
|
-
perfectionist:
|
|
2581
|
+
perfectionist: default21
|
|
2531
2582
|
},
|
|
2532
2583
|
rules: {
|
|
2533
2584
|
"perfectionist/sort-enums": [
|
|
@@ -2556,7 +2607,7 @@ var perfectionist = (options = {}) => {
|
|
|
2556
2607
|
name: "ntnyq/perfectionist/types",
|
|
2557
2608
|
files: [...GLOB_TYPES],
|
|
2558
2609
|
plugins: {
|
|
2559
|
-
perfectionist:
|
|
2610
|
+
perfectionist: default21
|
|
2560
2611
|
},
|
|
2561
2612
|
rules: {
|
|
2562
2613
|
"perfectionist/sort-heritage-clauses": [
|
|
@@ -2581,7 +2632,7 @@ var perfectionist = (options = {}) => {
|
|
|
2581
2632
|
type: "alphabetical",
|
|
2582
2633
|
order: "asc",
|
|
2583
2634
|
partitionByComment: true,
|
|
2584
|
-
groups:
|
|
2635
|
+
groups: defaultSortIntersectionTypesGroups
|
|
2585
2636
|
}
|
|
2586
2637
|
],
|
|
2587
2638
|
"perfectionist/sort-modules": [
|
|
@@ -2598,7 +2649,7 @@ var perfectionist = (options = {}) => {
|
|
|
2598
2649
|
type: "alphabetical",
|
|
2599
2650
|
order: "asc",
|
|
2600
2651
|
partitionByComment: true,
|
|
2601
|
-
groups:
|
|
2652
|
+
groups: defaultSortObjectTypesGroups
|
|
2602
2653
|
}
|
|
2603
2654
|
],
|
|
2604
2655
|
"perfectionist/sort-union-types": [
|
|
@@ -2606,7 +2657,8 @@ var perfectionist = (options = {}) => {
|
|
|
2606
2657
|
{
|
|
2607
2658
|
type: "alphabetical",
|
|
2608
2659
|
order: "asc",
|
|
2609
|
-
partitionByComment: true
|
|
2660
|
+
partitionByComment: true,
|
|
2661
|
+
groups: defaultSortUnionTypesGroups
|
|
2610
2662
|
}
|
|
2611
2663
|
],
|
|
2612
2664
|
// Overrides rules
|
|
@@ -2619,7 +2671,7 @@ var perfectionist = (options = {}) => {
|
|
|
2619
2671
|
name: "ntnyq/perfectionist/constants",
|
|
2620
2672
|
files: [`**/constants/${GLOB_SRC}`, `**/constants.${GLOB_SRC_EXT}`],
|
|
2621
2673
|
plugins: {
|
|
2622
|
-
perfectionist:
|
|
2674
|
+
perfectionist: default21
|
|
2623
2675
|
},
|
|
2624
2676
|
rules: {
|
|
2625
2677
|
"perfectionist/sort-maps": [
|
|
@@ -2667,7 +2719,7 @@ var unusedImports = (options = {}) => [
|
|
|
2667
2719
|
{
|
|
2668
2720
|
name: "ntnyq/unused-imports",
|
|
2669
2721
|
plugins: {
|
|
2670
|
-
"unused-imports":
|
|
2722
|
+
"unused-imports": default22
|
|
2671
2723
|
},
|
|
2672
2724
|
rules: {
|
|
2673
2725
|
"@typescript-eslint/no-unused-vars": "off",
|
|
@@ -2702,6 +2754,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
2702
2754
|
* Conditional by deps
|
|
2703
2755
|
*/
|
|
2704
2756
|
vue: enableVue = hasVue,
|
|
2757
|
+
pinia: enablePinia = hasPinia,
|
|
2705
2758
|
test: enableTest = hasVitest,
|
|
2706
2759
|
unocss: enableUnoCSS = hasUnoCSS,
|
|
2707
2760
|
typescript: enableTypeScript = hasTypeScript,
|
|
@@ -2772,6 +2825,14 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
2772
2825
|
})
|
|
2773
2826
|
);
|
|
2774
2827
|
}
|
|
2828
|
+
if (enablePinia) {
|
|
2829
|
+
configs2.push(
|
|
2830
|
+
...pinia({
|
|
2831
|
+
...resolveSubOptions(options, "pinia"),
|
|
2832
|
+
overrides: getOverrides(options, "pinia")
|
|
2833
|
+
})
|
|
2834
|
+
);
|
|
2835
|
+
}
|
|
2775
2836
|
if (enableRegexp) {
|
|
2776
2837
|
configs2.push(
|
|
2777
2838
|
...regexp({
|
|
@@ -2909,6 +2970,7 @@ export {
|
|
|
2909
2970
|
GLOB_MARKDOWN_CODE,
|
|
2910
2971
|
GLOB_MARKDOWN_NESTED,
|
|
2911
2972
|
GLOB_NODE_MODULES,
|
|
2973
|
+
GLOB_PINIA_STORE,
|
|
2912
2974
|
GLOB_POSTCSS,
|
|
2913
2975
|
GLOB_SCSS,
|
|
2914
2976
|
GLOB_SRC,
|
|
@@ -2925,14 +2987,13 @@ export {
|
|
|
2925
2987
|
antfu,
|
|
2926
2988
|
command,
|
|
2927
2989
|
comments,
|
|
2928
|
-
defaultSortInterfacesGroups,
|
|
2929
|
-
defaultSortIntersectionTypesGroups,
|
|
2930
|
-
defaultSortObjectTypesGroups,
|
|
2931
2990
|
defineESLintConfig,
|
|
2991
|
+
esX,
|
|
2932
2992
|
format,
|
|
2933
2993
|
getOverrides,
|
|
2934
2994
|
githubAction,
|
|
2935
2995
|
gitignore,
|
|
2996
|
+
hasPinia,
|
|
2936
2997
|
hasTypeScript,
|
|
2937
2998
|
hasUnoCSS,
|
|
2938
2999
|
hasVitest,
|
|
@@ -2957,31 +3018,34 @@ export {
|
|
|
2957
3018
|
parserVue,
|
|
2958
3019
|
parserYaml,
|
|
2959
3020
|
perfectionist,
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
3021
|
+
pinia,
|
|
3022
|
+
default10 as pluginAntfu,
|
|
3023
|
+
default23 as pluginComments,
|
|
3024
|
+
default4 as pluginEsX,
|
|
3025
|
+
default13 as pluginFormat,
|
|
3026
|
+
default20 as pluginGitHubAction,
|
|
3027
|
+
default17 as pluginImportX,
|
|
3028
|
+
default11 as pluginJsdoc,
|
|
3029
|
+
default12 as pluginJsonc,
|
|
3030
|
+
default9 as pluginMarkdown,
|
|
2968
3031
|
default2 as pluginNode,
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
3032
|
+
default8 as pluginNtnyq,
|
|
3033
|
+
default21 as pluginPerfectionist,
|
|
3034
|
+
default7 as pluginPinia,
|
|
3035
|
+
default18 as pluginPrettier,
|
|
2972
3036
|
pluginRegexp,
|
|
2973
|
-
|
|
2974
|
-
|
|
3037
|
+
default19 as pluginStylistic,
|
|
3038
|
+
default6 as pluginToml,
|
|
2975
3039
|
plugin as pluginTypeScript,
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
3040
|
+
default16 as pluginUnicorn,
|
|
3041
|
+
default14 as pluginUnoCSS,
|
|
3042
|
+
default22 as pluginUnusedImports,
|
|
3043
|
+
default15 as pluginVitest,
|
|
2980
3044
|
default3 as pluginVue,
|
|
2981
|
-
|
|
3045
|
+
default5 as pluginYaml,
|
|
2982
3046
|
prettier,
|
|
2983
3047
|
processorPassThrough,
|
|
2984
|
-
|
|
3048
|
+
default24 as processorVueBlocks,
|
|
2985
3049
|
regexp,
|
|
2986
3050
|
resolveSubOptions,
|
|
2987
3051
|
sort,
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
5
|
-
"packageManager": "pnpm@9.
|
|
4
|
+
"version": "3.9.0",
|
|
5
|
+
"packageManager": "pnpm@9.15.0",
|
|
6
6
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"eslint",
|
|
@@ -60,21 +60,23 @@
|
|
|
60
60
|
"@eslint/js": "^9.16.0",
|
|
61
61
|
"@eslint/markdown": "^6.2.1",
|
|
62
62
|
"@stylistic/eslint-plugin": "^2.11.0",
|
|
63
|
-
"@unocss/eslint-plugin": "^0.65.
|
|
63
|
+
"@unocss/eslint-plugin": "^0.65.1",
|
|
64
64
|
"@vitest/eslint-plugin": "^1.1.14",
|
|
65
65
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
66
66
|
"eslint-flat-config-utils": "^0.4.0",
|
|
67
67
|
"eslint-merge-processors": "^0.1.0",
|
|
68
68
|
"eslint-plugin-antfu": "^2.7.0",
|
|
69
69
|
"eslint-plugin-command": "^0.2.6",
|
|
70
|
+
"eslint-plugin-es-x": "^8.4.1",
|
|
70
71
|
"eslint-plugin-format": "^0.1.3",
|
|
71
|
-
"eslint-plugin-github-action": "^0.0.
|
|
72
|
+
"eslint-plugin-github-action": "^0.0.11",
|
|
72
73
|
"eslint-plugin-import-x": "^4.5.0",
|
|
73
74
|
"eslint-plugin-jsdoc": "^50.6.0",
|
|
74
75
|
"eslint-plugin-jsonc": "^2.18.2",
|
|
75
76
|
"eslint-plugin-n": "^17.14.0",
|
|
76
77
|
"eslint-plugin-ntnyq": "^0.7.1",
|
|
77
78
|
"eslint-plugin-perfectionist": "^4.2.0",
|
|
79
|
+
"eslint-plugin-pinia": "^0.4.1",
|
|
78
80
|
"eslint-plugin-prettier": "^5.2.1",
|
|
79
81
|
"eslint-plugin-regexp": "^2.7.0",
|
|
80
82
|
"eslint-plugin-toml": "^0.12.0",
|
|
@@ -86,7 +88,7 @@
|
|
|
86
88
|
"globals": "^15.13.0",
|
|
87
89
|
"jsonc-eslint-parser": "^2.4.0",
|
|
88
90
|
"local-pkg": "^0.5.1",
|
|
89
|
-
"prettier": "^3.4.
|
|
91
|
+
"prettier": "^3.4.2",
|
|
90
92
|
"toml-eslint-parser": "^0.10.0",
|
|
91
93
|
"typescript-eslint": "^8.17.0",
|
|
92
94
|
"vue-eslint-parser": "^9.4.3",
|
|
@@ -117,7 +119,6 @@
|
|
|
117
119
|
"@vitest/eslint-plugin": "patches/@vitest__eslint-plugin.patch"
|
|
118
120
|
}
|
|
119
121
|
},
|
|
120
|
-
"prettier": "@ntnyq/prettier-config",
|
|
121
122
|
"nano-staged": {
|
|
122
123
|
"*.{js,ts,mjs,cjs,json,jsonc,md,yaml,yml}": "eslint --flag unstable_ts_config --fix"
|
|
123
124
|
}
|