@ntnyq/eslint-config 3.3.0 → 3.3.1
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 +2 -0
- package/dist/index.cjs +28 -0
- package/dist/index.d.cts +5605 -3818
- package/dist/index.d.ts +5605 -3818
- package/dist/index.js +42 -16
- package/package.json +8 -7
package/dist/index.js
CHANGED
|
@@ -53,10 +53,11 @@ import { default as default13 } from "@vitest/eslint-plugin";
|
|
|
53
53
|
import { default as default14 } from "eslint-plugin-import-x";
|
|
54
54
|
import { default as default15 } from "eslint-plugin-unicorn";
|
|
55
55
|
import { default as default16 } from "eslint-plugin-prettier";
|
|
56
|
-
import { default as default17 } from "eslint-plugin
|
|
57
|
-
import { default as default18 } from "eslint-plugin-
|
|
58
|
-
import { default as default19 } from "eslint-plugin-
|
|
59
|
-
import { default as default20 } from "
|
|
56
|
+
import { default as default17 } from "@stylistic/eslint-plugin";
|
|
57
|
+
import { default as default18 } from "eslint-plugin-github-action";
|
|
58
|
+
import { default as default19 } from "eslint-plugin-perfectionist";
|
|
59
|
+
import { default as default20 } from "eslint-plugin-unused-imports";
|
|
60
|
+
import { default as default21 } from "@eslint-community/eslint-plugin-eslint-comments";
|
|
60
61
|
|
|
61
62
|
// src/eslint/configs.ts
|
|
62
63
|
import { configs } from "typescript-eslint";
|
|
@@ -64,7 +65,7 @@ import { configs } from "typescript-eslint";
|
|
|
64
65
|
// src/eslint/processors.ts
|
|
65
66
|
import { mergeProcessors } from "eslint-merge-processors";
|
|
66
67
|
import { processorPassThrough } from "eslint-merge-processors";
|
|
67
|
-
import { default as
|
|
68
|
+
import { default as default22 } from "eslint-processor-vue-blocks";
|
|
68
69
|
|
|
69
70
|
// src/globs.ts
|
|
70
71
|
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
@@ -511,7 +512,7 @@ var vue = (options = {}) => {
|
|
|
511
512
|
},
|
|
512
513
|
processor: sfcBlocks === false ? default3.processors[".vue"] : mergeProcessors2([
|
|
513
514
|
default3.processors[".vue"],
|
|
514
|
-
|
|
515
|
+
default22({
|
|
515
516
|
...sfcBlocks,
|
|
516
517
|
blocks: {
|
|
517
518
|
styles: true,
|
|
@@ -1573,10 +1574,10 @@ var comments = (options = {}) => [
|
|
|
1573
1574
|
{
|
|
1574
1575
|
name: "ntnyq/eslint-comments",
|
|
1575
1576
|
plugins: {
|
|
1576
|
-
"@eslint-community/eslint-comments":
|
|
1577
|
+
"@eslint-community/eslint-comments": default21
|
|
1577
1578
|
},
|
|
1578
1579
|
rules: {
|
|
1579
|
-
...
|
|
1580
|
+
...default21.configs.recommended.rules,
|
|
1580
1581
|
"@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
|
|
1581
1582
|
// Overrides rules
|
|
1582
1583
|
...options.overrides
|
|
@@ -1695,6 +1696,22 @@ var prettier = (options = {}) => {
|
|
|
1695
1696
|
];
|
|
1696
1697
|
};
|
|
1697
1698
|
|
|
1699
|
+
// src/configs/stylistic.ts
|
|
1700
|
+
var stylistic = (options = {}) => [
|
|
1701
|
+
{
|
|
1702
|
+
name: "ntnyq/stylistic",
|
|
1703
|
+
plugins: {
|
|
1704
|
+
"@stylistic": default17
|
|
1705
|
+
},
|
|
1706
|
+
rules: {
|
|
1707
|
+
// Only rules are not conflicted with Prettier
|
|
1708
|
+
// Use stylistic config to provide type support
|
|
1709
|
+
// Overrides rules
|
|
1710
|
+
...options.overrides
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
];
|
|
1714
|
+
|
|
1698
1715
|
// src/configs/gitignore.ts
|
|
1699
1716
|
import createGitIgnoreConfig from "eslint-config-flat-gitignore";
|
|
1700
1717
|
var gitignore = (options = {}) => {
|
|
@@ -1946,7 +1963,7 @@ var githubAction = (options = {}) => [
|
|
|
1946
1963
|
name: "ntnyq/github-action",
|
|
1947
1964
|
files: [GLOB_GITHUB_ACTION],
|
|
1948
1965
|
plugins: {
|
|
1949
|
-
"github-action":
|
|
1966
|
+
"github-action": default18
|
|
1950
1967
|
},
|
|
1951
1968
|
rules: {
|
|
1952
1969
|
"github-action/require-action-name": "error",
|
|
@@ -1961,7 +1978,7 @@ var perfectionist = (options = {}) => [
|
|
|
1961
1978
|
{
|
|
1962
1979
|
name: "ntnyq/perfectionist",
|
|
1963
1980
|
plugins: {
|
|
1964
|
-
perfectionist:
|
|
1981
|
+
perfectionist: default19
|
|
1965
1982
|
},
|
|
1966
1983
|
rules: {
|
|
1967
1984
|
"perfectionist/sort-imports": [
|
|
@@ -2047,7 +2064,7 @@ var unusedImports = (options = {}) => [
|
|
|
2047
2064
|
{
|
|
2048
2065
|
name: "ntnyq/unused-imports",
|
|
2049
2066
|
plugins: {
|
|
2050
|
-
"unused-imports":
|
|
2067
|
+
"unused-imports": default20
|
|
2051
2068
|
},
|
|
2052
2069
|
rules: {
|
|
2053
2070
|
"@typescript-eslint/no-unused-vars": "off",
|
|
@@ -2214,6 +2231,13 @@ function defineESLintConfig(options = {}, userConfigs = []) {
|
|
|
2214
2231
|
})
|
|
2215
2232
|
);
|
|
2216
2233
|
}
|
|
2234
|
+
if (options.stylistic ?? true) {
|
|
2235
|
+
configs2.push(
|
|
2236
|
+
...stylistic({
|
|
2237
|
+
overrides: getOverrides(options, "stylistic")
|
|
2238
|
+
})
|
|
2239
|
+
);
|
|
2240
|
+
}
|
|
2217
2241
|
if (options.githubAction ?? true) {
|
|
2218
2242
|
configs2.push(
|
|
2219
2243
|
...githubAction({
|
|
@@ -2302,33 +2326,35 @@ export {
|
|
|
2302
2326
|
parserYaml,
|
|
2303
2327
|
perfectionist,
|
|
2304
2328
|
default8 as pluginAntfu,
|
|
2305
|
-
|
|
2329
|
+
default21 as pluginComments,
|
|
2306
2330
|
default11 as pluginFormat,
|
|
2307
|
-
|
|
2331
|
+
default18 as pluginGitHubAction,
|
|
2308
2332
|
default14 as pluginImport,
|
|
2309
2333
|
default9 as pluginJsdoc,
|
|
2310
2334
|
default10 as pluginJsonc,
|
|
2311
2335
|
default7 as pluginMarkdown,
|
|
2312
2336
|
default2 as pluginNode,
|
|
2313
2337
|
default6 as pluginNtnyq,
|
|
2314
|
-
|
|
2338
|
+
default19 as pluginPerfectionist,
|
|
2315
2339
|
default16 as pluginPrettier,
|
|
2316
2340
|
pluginRegexp,
|
|
2341
|
+
default17 as pluginStylistic,
|
|
2317
2342
|
default5 as pluginToml,
|
|
2318
2343
|
plugin as pluginTypeScript,
|
|
2319
2344
|
default15 as pluginUnicorn,
|
|
2320
2345
|
default12 as pluginUnoCSS,
|
|
2321
|
-
|
|
2346
|
+
default20 as pluginUnusedImports,
|
|
2322
2347
|
default13 as pluginVitest,
|
|
2323
2348
|
default3 as pluginVue,
|
|
2324
2349
|
default4 as pluginYaml,
|
|
2325
2350
|
prettier,
|
|
2326
2351
|
processorPassThrough,
|
|
2327
|
-
|
|
2352
|
+
default22 as processorVueBlocks,
|
|
2328
2353
|
regexp,
|
|
2329
2354
|
resolveSubOptions,
|
|
2330
2355
|
sort,
|
|
2331
2356
|
specials,
|
|
2357
|
+
stylistic,
|
|
2332
2358
|
test,
|
|
2333
2359
|
toArray,
|
|
2334
2360
|
toml,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.1",
|
|
5
5
|
"packageManager": "pnpm@9.14.2",
|
|
6
6
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
7
7
|
"keywords": [
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
59
59
|
"@eslint/js": "^9.15.0",
|
|
60
60
|
"@eslint/markdown": "^6.2.1",
|
|
61
|
+
"@stylistic/eslint-plugin": "^2.11.0",
|
|
61
62
|
"@unocss/eslint-plugin": "^0.64.1",
|
|
62
63
|
"@vitest/eslint-plugin": "^1.1.10",
|
|
63
64
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
@@ -66,12 +67,12 @@
|
|
|
66
67
|
"eslint-plugin-antfu": "^2.7.0",
|
|
67
68
|
"eslint-plugin-command": "^0.2.6",
|
|
68
69
|
"eslint-plugin-format": "^0.1.2",
|
|
69
|
-
"eslint-plugin-github-action": "^0.0.
|
|
70
|
+
"eslint-plugin-github-action": "^0.0.4",
|
|
70
71
|
"eslint-plugin-import-x": "^4.4.3",
|
|
71
72
|
"eslint-plugin-jsdoc": "^50.5.0",
|
|
72
73
|
"eslint-plugin-jsonc": "^2.18.2",
|
|
73
|
-
"eslint-plugin-n": "^17.
|
|
74
|
-
"eslint-plugin-ntnyq": "^0.
|
|
74
|
+
"eslint-plugin-n": "^17.14.0",
|
|
75
|
+
"eslint-plugin-ntnyq": "^0.7.0",
|
|
75
76
|
"eslint-plugin-perfectionist": "^4.0.3",
|
|
76
77
|
"eslint-plugin-prettier": "^5.2.1",
|
|
77
78
|
"eslint-plugin-regexp": "^2.7.0",
|
|
@@ -91,8 +92,8 @@
|
|
|
91
92
|
"yaml-eslint-parser": "^1.2.3"
|
|
92
93
|
},
|
|
93
94
|
"devDependencies": {
|
|
94
|
-
"@ntnyq/prettier-config": "^1.
|
|
95
|
-
"@types/node": "^22.9.
|
|
95
|
+
"@ntnyq/prettier-config": "^1.22.0",
|
|
96
|
+
"@types/node": "^22.9.3",
|
|
96
97
|
"bumpp": "^9.8.1",
|
|
97
98
|
"eslint": "^9.15.0",
|
|
98
99
|
"eslint-typegen": "^0.3.2",
|
|
@@ -103,7 +104,7 @@
|
|
|
103
104
|
"rimraf": "^6.0.1",
|
|
104
105
|
"tsup": "^8.3.5",
|
|
105
106
|
"tsx": "^4.19.2",
|
|
106
|
-
"typescript": "^5.
|
|
107
|
+
"typescript": "^5.7.2",
|
|
107
108
|
"zx": "^8.2.2"
|
|
108
109
|
},
|
|
109
110
|
"engines": {
|