@ntnyq/eslint-config 3.7.0 → 3.7.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 +97 -60
- package/dist/index.d.cts +158 -126
- package/dist/index.d.ts +158 -126
- package/dist/index.js +97 -60
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1012,7 +1012,6 @@ var jsdoc = (options = {}) => [
|
|
|
1012
1012
|
"jsdoc/check-line-alignment": "error",
|
|
1013
1013
|
"jsdoc/check-param-names": "error",
|
|
1014
1014
|
"jsdoc/check-property-names": "error",
|
|
1015
|
-
"jsdoc/check-tag-names": "error",
|
|
1016
1015
|
"jsdoc/check-types": "error",
|
|
1017
1016
|
"jsdoc/empty-tags": "error",
|
|
1018
1017
|
"jsdoc/multiline-blocks": "error",
|
|
@@ -1023,6 +1022,16 @@ var jsdoc = (options = {}) => [
|
|
|
1023
1022
|
"jsdoc/no-multi-asterisks": "error",
|
|
1024
1023
|
"jsdoc/require-asterisk-prefix": "error",
|
|
1025
1024
|
"jsdoc/require-hyphen-before-param-description": "error",
|
|
1025
|
+
"jsdoc/check-tag-names": [
|
|
1026
|
+
"error",
|
|
1027
|
+
{
|
|
1028
|
+
definedTags: [
|
|
1029
|
+
// magic-comments
|
|
1030
|
+
"vite-ignore",
|
|
1031
|
+
"unocss-include"
|
|
1032
|
+
]
|
|
1033
|
+
}
|
|
1034
|
+
],
|
|
1026
1035
|
// TODO: this after investigate
|
|
1027
1036
|
// 'jsdoc/sort-tags': [
|
|
1028
1037
|
// 'error',
|
|
@@ -1310,51 +1319,51 @@ var unocss = (options = {}) => [
|
|
|
1310
1319
|
|
|
1311
1320
|
// src/constants.ts
|
|
1312
1321
|
var DEFAULT_PRETTIER_OPTIONS = {
|
|
1313
|
-
//
|
|
1314
|
-
|
|
1315
|
-
//
|
|
1316
|
-
|
|
1317
|
-
//
|
|
1318
|
-
|
|
1319
|
-
//
|
|
1320
|
-
|
|
1321
|
-
// Maximum line length
|
|
1322
|
-
printWidth: 100,
|
|
1322
|
+
// Include parentheses around a sole arrow function parameter
|
|
1323
|
+
arrowParens: "avoid",
|
|
1324
|
+
// Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements)
|
|
1325
|
+
bracketSameLine: false,
|
|
1326
|
+
// Print spaces between brackets in object literals.
|
|
1327
|
+
bracketSpacing: true,
|
|
1328
|
+
// Control whether Prettier formats quoted code embedded in the file
|
|
1329
|
+
embeddedLanguageFormatting: "auto",
|
|
1323
1330
|
// End of line
|
|
1324
1331
|
endOfLine: "lf",
|
|
1325
|
-
//
|
|
1326
|
-
|
|
1332
|
+
// Specify the global whitespace sensitivity for HTML files
|
|
1333
|
+
htmlWhitespaceSensitivity: "css",
|
|
1327
1334
|
// Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier.
|
|
1328
1335
|
insertPragma: false,
|
|
1329
1336
|
// Use single quotes instead of double quotes in JSX
|
|
1330
1337
|
jsxSingleQuote: true,
|
|
1331
|
-
//
|
|
1332
|
-
|
|
1333
|
-
// Print spaces between brackets in object literals.
|
|
1334
|
-
bracketSpacing: true,
|
|
1335
|
-
// Include parentheses around a sole arrow function parameter
|
|
1336
|
-
arrowParens: "avoid",
|
|
1337
|
-
// Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
|
|
1338
|
-
requirePragma: false,
|
|
1339
|
-
// Specify which parser to use.
|
|
1340
|
-
// parser: undefined,
|
|
1341
|
-
// Specify the file name to use to infer which parser to use.
|
|
1342
|
-
// filepath: undefined,
|
|
1338
|
+
// Maximum line length
|
|
1339
|
+
printWidth: 100,
|
|
1343
1340
|
// By default, Prettier will wrap markdown text as-is since some services use a line-break-sensitive renderer, e.g. GitHub comment and Bitbucket.
|
|
1344
1341
|
proseWrap: "preserve",
|
|
1345
|
-
// Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements)
|
|
1346
|
-
bracketSameLine: false,
|
|
1347
1342
|
// Change when properties in objects are quoted
|
|
1348
1343
|
quoteProps: "as-needed",
|
|
1344
|
+
rangeEnd: Number.POSITIVE_INFINITY,
|
|
1345
|
+
// Format only a segment of a file.
|
|
1346
|
+
rangeStart: 0,
|
|
1347
|
+
// Specify which parser to use.
|
|
1348
|
+
// parser: undefined,
|
|
1349
|
+
// Specify the file name to use to infer which parser to use.
|
|
1350
|
+
// filepath: undefined,
|
|
1351
|
+
// Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
|
|
1352
|
+
requirePragma: false,
|
|
1353
|
+
// Use semicolons or not
|
|
1354
|
+
semi: false,
|
|
1349
1355
|
// Enforce single attribute per line in HTML, Vue and JSX
|
|
1350
1356
|
singleAttributePerLine: true,
|
|
1357
|
+
// Use single quotes instead of double quotes
|
|
1358
|
+
singleQuote: true,
|
|
1359
|
+
// Specify the number of spaces per indentation-level
|
|
1360
|
+
tabWidth: 2,
|
|
1361
|
+
// Print trailing commas wherever possible when multi-line
|
|
1362
|
+
trailingComma: "all",
|
|
1363
|
+
// Indent lines with tabs instead of spaces
|
|
1364
|
+
useTabs: false,
|
|
1351
1365
|
// Whether or not to indent the code inside <script> and <style> tags in Vue files
|
|
1352
|
-
vueIndentScriptAndStyle: false
|
|
1353
|
-
// Specify the global whitespace sensitivity for HTML files
|
|
1354
|
-
htmlWhitespaceSensitivity: "css",
|
|
1355
|
-
rangeEnd: Number.POSITIVE_INFINITY,
|
|
1356
|
-
// Control whether Prettier formats quoted code embedded in the file
|
|
1357
|
-
embeddedLanguageFormatting: "auto"
|
|
1366
|
+
vueIndentScriptAndStyle: false
|
|
1358
1367
|
};
|
|
1359
1368
|
|
|
1360
1369
|
// src/utils/env.ts
|
|
@@ -1703,7 +1712,7 @@ var specials = (options = {}) => [
|
|
|
1703
1712
|
"perfectionist/sort-objects": [
|
|
1704
1713
|
"error",
|
|
1705
1714
|
{
|
|
1706
|
-
type: "
|
|
1715
|
+
type: "alphabetical",
|
|
1707
1716
|
order: "asc"
|
|
1708
1717
|
}
|
|
1709
1718
|
],
|
|
@@ -2332,20 +2341,30 @@ var typescript = (options = {}) => {
|
|
|
2332
2341
|
};
|
|
2333
2342
|
|
|
2334
2343
|
// src/configs/githubAction.ts
|
|
2335
|
-
|
|
2336
|
-
|
|
2344
|
+
import { createRecommendedConfig } from "eslint-plugin-github-action";
|
|
2345
|
+
var githubAction = (options = {}) => {
|
|
2346
|
+
const {
|
|
2347
|
+
// Support common overrides rules
|
|
2348
|
+
overrides: overridesRules = {},
|
|
2349
|
+
// Flat config options
|
|
2350
|
+
...restOptions
|
|
2351
|
+
} = options;
|
|
2352
|
+
const recommendedConfig = createRecommendedConfig({
|
|
2337
2353
|
name: "ntnyq/github-action",
|
|
2338
2354
|
files: [GLOB_GITHUB_ACTION],
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2355
|
+
...restOptions
|
|
2356
|
+
});
|
|
2357
|
+
return [
|
|
2358
|
+
{
|
|
2359
|
+
...recommendedConfig,
|
|
2360
|
+
rules: {
|
|
2361
|
+
...recommendedConfig.rules,
|
|
2362
|
+
// Overrides rules
|
|
2363
|
+
...overridesRules
|
|
2364
|
+
}
|
|
2346
2365
|
}
|
|
2347
|
-
|
|
2348
|
-
|
|
2366
|
+
];
|
|
2367
|
+
};
|
|
2349
2368
|
|
|
2350
2369
|
// src/configs/perfectionist.ts
|
|
2351
2370
|
var perfectionist = (options = {}) => {
|
|
@@ -2449,15 +2468,17 @@ var perfectionist = (options = {}) => {
|
|
|
2449
2468
|
"perfectionist/sort-enums": [
|
|
2450
2469
|
"error",
|
|
2451
2470
|
{
|
|
2452
|
-
type: "
|
|
2453
|
-
order: "asc"
|
|
2471
|
+
type: "alphabetical",
|
|
2472
|
+
order: "asc",
|
|
2473
|
+
partitionByComment: true
|
|
2454
2474
|
}
|
|
2455
2475
|
],
|
|
2456
2476
|
"perfectionist/sort-modules": [
|
|
2457
2477
|
"error",
|
|
2458
2478
|
{
|
|
2459
|
-
type: "
|
|
2460
|
-
order: "asc"
|
|
2479
|
+
type: "alphabetical",
|
|
2480
|
+
order: "asc",
|
|
2481
|
+
partitionByComment: true
|
|
2461
2482
|
}
|
|
2462
2483
|
],
|
|
2463
2484
|
// Overrides rules
|
|
@@ -2485,6 +2506,7 @@ var perfectionist = (options = {}) => {
|
|
|
2485
2506
|
// {
|
|
2486
2507
|
// type: 'alphabetical',
|
|
2487
2508
|
// order: 'asc',
|
|
2509
|
+
// partitionByComment: true,
|
|
2488
2510
|
// },
|
|
2489
2511
|
// ],
|
|
2490
2512
|
"perfectionist/sort-intersection-types": [
|
|
@@ -2505,28 +2527,32 @@ var perfectionist = (options = {}) => {
|
|
|
2505
2527
|
"tuple",
|
|
2506
2528
|
"union",
|
|
2507
2529
|
"nullish"
|
|
2508
|
-
]
|
|
2530
|
+
],
|
|
2531
|
+
partitionByComment: true
|
|
2509
2532
|
}
|
|
2510
2533
|
],
|
|
2511
2534
|
"perfectionist/sort-modules": [
|
|
2512
2535
|
"error",
|
|
2513
2536
|
{
|
|
2514
|
-
type: "
|
|
2515
|
-
order: "asc"
|
|
2537
|
+
type: "alphabetical",
|
|
2538
|
+
order: "asc",
|
|
2539
|
+
partitionByComment: true
|
|
2516
2540
|
}
|
|
2517
2541
|
],
|
|
2518
2542
|
"perfectionist/sort-object-types": [
|
|
2519
2543
|
"error",
|
|
2520
2544
|
{
|
|
2521
2545
|
type: "alphabetical",
|
|
2522
|
-
order: "asc"
|
|
2546
|
+
order: "asc",
|
|
2547
|
+
partitionByComment: true
|
|
2523
2548
|
}
|
|
2524
2549
|
],
|
|
2525
2550
|
"perfectionist/sort-union-types": [
|
|
2526
2551
|
"error",
|
|
2527
2552
|
{
|
|
2528
|
-
type: "
|
|
2529
|
-
order: "asc"
|
|
2553
|
+
type: "alphabetical",
|
|
2554
|
+
order: "asc",
|
|
2555
|
+
partitionByComment: true
|
|
2530
2556
|
}
|
|
2531
2557
|
],
|
|
2532
2558
|
// Overrides rules
|
|
@@ -2546,21 +2572,32 @@ var perfectionist = (options = {}) => {
|
|
|
2546
2572
|
"error",
|
|
2547
2573
|
{
|
|
2548
2574
|
type: "alphabetical",
|
|
2549
|
-
order: "asc"
|
|
2575
|
+
order: "asc",
|
|
2576
|
+
partitionByComment: true
|
|
2550
2577
|
}
|
|
2551
2578
|
],
|
|
2552
2579
|
"perfectionist/sort-objects": [
|
|
2553
2580
|
"error",
|
|
2554
2581
|
{
|
|
2555
|
-
type: "
|
|
2556
|
-
order: "asc"
|
|
2582
|
+
type: "alphabetical",
|
|
2583
|
+
order: "asc",
|
|
2584
|
+
partitionByComment: true
|
|
2557
2585
|
}
|
|
2558
2586
|
],
|
|
2559
2587
|
"perfectionist/sort-sets": [
|
|
2560
2588
|
"error",
|
|
2561
2589
|
{
|
|
2562
|
-
type: "
|
|
2563
|
-
order: "asc"
|
|
2590
|
+
type: "alphabetical",
|
|
2591
|
+
order: "asc",
|
|
2592
|
+
partitionByComment: true
|
|
2593
|
+
}
|
|
2594
|
+
],
|
|
2595
|
+
"perfectionist/sort-modules": [
|
|
2596
|
+
"error",
|
|
2597
|
+
{
|
|
2598
|
+
type: "alphabetical",
|
|
2599
|
+
order: "asc",
|
|
2600
|
+
partitionByComment: true
|
|
2564
2601
|
}
|
|
2565
2602
|
],
|
|
2566
2603
|
// Overrides rules
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.7.
|
|
4
|
+
"version": "3.7.2",
|
|
5
5
|
"packageManager": "pnpm@9.14.4",
|
|
6
6
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
7
7
|
"keywords": [
|
|
@@ -53,22 +53,22 @@
|
|
|
53
53
|
"typecheck": "tsc --noEmit"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"eslint": "^9.
|
|
56
|
+
"eslint": "^9.5.0"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
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.
|
|
64
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
63
|
+
"@unocss/eslint-plugin": "^0.65.0",
|
|
64
|
+
"@vitest/eslint-plugin": "^1.1.13",
|
|
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
70
|
"eslint-plugin-format": "^0.1.3",
|
|
71
|
-
"eslint-plugin-github-action": "^0.0.
|
|
71
|
+
"eslint-plugin-github-action": "^0.0.8",
|
|
72
72
|
"eslint-plugin-import-x": "^4.4.3",
|
|
73
73
|
"eslint-plugin-jsdoc": "^50.6.0",
|
|
74
74
|
"eslint-plugin-jsonc": "^2.18.2",
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
"eslint-plugin-perfectionist": "^4.1.2",
|
|
78
78
|
"eslint-plugin-prettier": "^5.2.1",
|
|
79
79
|
"eslint-plugin-regexp": "^2.7.0",
|
|
80
|
-
"eslint-plugin-toml": "^0.
|
|
80
|
+
"eslint-plugin-toml": "^0.12.0",
|
|
81
81
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
82
82
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
83
83
|
"eslint-plugin-vue": "^9.32.0",
|
|
84
|
-
"eslint-plugin-yml": "^1.
|
|
84
|
+
"eslint-plugin-yml": "^1.16.0",
|
|
85
85
|
"eslint-processor-vue-blocks": "^0.1.2",
|
|
86
|
-
"globals": "^15.
|
|
86
|
+
"globals": "^15.13.0",
|
|
87
87
|
"jsonc-eslint-parser": "^2.4.0",
|
|
88
88
|
"local-pkg": "^0.5.1",
|
|
89
89
|
"prettier": "^3.4.1",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"tsup": "^8.3.5",
|
|
107
107
|
"tsx": "^4.19.2",
|
|
108
108
|
"typescript": "^5.7.2",
|
|
109
|
-
"vitest": "^2.1.
|
|
109
|
+
"vitest": "^2.1.7",
|
|
110
110
|
"zx": "^8.2.4"
|
|
111
111
|
},
|
|
112
112
|
"engines": {
|