@pengzhanbo/eslint-config 1.6.0 → 1.7.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/dist/index.cjs +23 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +23 -1
- package/package.json +11 -11
package/dist/index.cjs
CHANGED
|
@@ -1465,6 +1465,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
1465
1465
|
}
|
|
1466
1466
|
if (options === true) {
|
|
1467
1467
|
options = {
|
|
1468
|
+
astro: (0, import_local_pkg3.isPackageExists)("astro"),
|
|
1468
1469
|
css: true,
|
|
1469
1470
|
graphql: true,
|
|
1470
1471
|
html: true,
|
|
@@ -1619,6 +1620,27 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
1619
1620
|
}
|
|
1620
1621
|
});
|
|
1621
1622
|
}
|
|
1623
|
+
if (options.astro) {
|
|
1624
|
+
configs.push({
|
|
1625
|
+
files: [GLOB_ASTRO],
|
|
1626
|
+
languageOptions: {
|
|
1627
|
+
parser: parserPlain
|
|
1628
|
+
},
|
|
1629
|
+
name: "config:formatter:astro",
|
|
1630
|
+
rules: {
|
|
1631
|
+
"format/prettier": [
|
|
1632
|
+
"error",
|
|
1633
|
+
{
|
|
1634
|
+
...prettierOptions,
|
|
1635
|
+
parser: "astro",
|
|
1636
|
+
plugins: [
|
|
1637
|
+
"prettier-plugin-astro"
|
|
1638
|
+
]
|
|
1639
|
+
}
|
|
1640
|
+
]
|
|
1641
|
+
}
|
|
1642
|
+
});
|
|
1643
|
+
}
|
|
1622
1644
|
return configs;
|
|
1623
1645
|
}
|
|
1624
1646
|
|
|
@@ -1756,7 +1778,7 @@ function resolveOptions(options = {}) {
|
|
|
1756
1778
|
componentExts = [],
|
|
1757
1779
|
preset = [],
|
|
1758
1780
|
gitignore = true,
|
|
1759
|
-
isInEditor = !!((import_node_process2.default.env.VSCODE_PID || import_node_process2.default.env.JETBRAINS_IDE || import_node_process2.default.env.VIM) && !import_node_process2.default.env.CI),
|
|
1781
|
+
isInEditor = !!((import_node_process2.default.env.VSCODE_PID || import_node_process2.default.env.VSCODE_CWD || import_node_process2.default.env.JETBRAINS_IDE || import_node_process2.default.env.VIM) && !import_node_process2.default.env.CI),
|
|
1760
1782
|
typescript: typescript2 = (0, import_local_pkg4.isPackageExists)("typescript"),
|
|
1761
1783
|
jsx = true,
|
|
1762
1784
|
test: test2 = true,
|
package/dist/index.d.cts
CHANGED
|
@@ -180,6 +180,12 @@ interface OptionsFormatters {
|
|
|
180
180
|
* By default it's controlled by our own config.
|
|
181
181
|
*/
|
|
182
182
|
dprintOptions?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Enable formatting support for Astro.
|
|
185
|
+
*
|
|
186
|
+
* Currently only support Prettier.
|
|
187
|
+
*/
|
|
188
|
+
astro?: boolean;
|
|
183
189
|
}
|
|
184
190
|
interface OptionsComponentExts {
|
|
185
191
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -180,6 +180,12 @@ interface OptionsFormatters {
|
|
|
180
180
|
* By default it's controlled by our own config.
|
|
181
181
|
*/
|
|
182
182
|
dprintOptions?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Enable formatting support for Astro.
|
|
185
|
+
*
|
|
186
|
+
* Currently only support Prettier.
|
|
187
|
+
*/
|
|
188
|
+
astro?: boolean;
|
|
183
189
|
}
|
|
184
190
|
interface OptionsComponentExts {
|
|
185
191
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1366,6 +1366,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
1366
1366
|
}
|
|
1367
1367
|
if (options === true) {
|
|
1368
1368
|
options = {
|
|
1369
|
+
astro: isPackageExists3("astro"),
|
|
1369
1370
|
css: true,
|
|
1370
1371
|
graphql: true,
|
|
1371
1372
|
html: true,
|
|
@@ -1520,6 +1521,27 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
1520
1521
|
}
|
|
1521
1522
|
});
|
|
1522
1523
|
}
|
|
1524
|
+
if (options.astro) {
|
|
1525
|
+
configs.push({
|
|
1526
|
+
files: [GLOB_ASTRO],
|
|
1527
|
+
languageOptions: {
|
|
1528
|
+
parser: parserPlain
|
|
1529
|
+
},
|
|
1530
|
+
name: "config:formatter:astro",
|
|
1531
|
+
rules: {
|
|
1532
|
+
"format/prettier": [
|
|
1533
|
+
"error",
|
|
1534
|
+
{
|
|
1535
|
+
...prettierOptions,
|
|
1536
|
+
parser: "astro",
|
|
1537
|
+
plugins: [
|
|
1538
|
+
"prettier-plugin-astro"
|
|
1539
|
+
]
|
|
1540
|
+
}
|
|
1541
|
+
]
|
|
1542
|
+
}
|
|
1543
|
+
});
|
|
1544
|
+
}
|
|
1523
1545
|
return configs;
|
|
1524
1546
|
}
|
|
1525
1547
|
|
|
@@ -1657,7 +1679,7 @@ function resolveOptions(options = {}) {
|
|
|
1657
1679
|
componentExts = [],
|
|
1658
1680
|
preset = [],
|
|
1659
1681
|
gitignore = true,
|
|
1660
|
-
isInEditor = !!((process2.env.VSCODE_PID || process2.env.JETBRAINS_IDE || process2.env.VIM) && !process2.env.CI),
|
|
1682
|
+
isInEditor = !!((process2.env.VSCODE_PID || process2.env.VSCODE_CWD || process2.env.JETBRAINS_IDE || process2.env.VIM) && !process2.env.CI),
|
|
1661
1683
|
typescript: typescript2 = isPackageExists4("typescript"),
|
|
1662
1684
|
jsx = true,
|
|
1663
1685
|
test: test2 = true,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pengzhanbo/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.7.0",
|
|
5
5
|
"author": "pengzhanbo <q942450674@outlook.com> (https://github/pengzhanbo/)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/pengzhanbo/configs#readme",
|
|
@@ -51,26 +51,26 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@antfu/eslint-define-config": "^1.23.0-2",
|
|
53
53
|
"@eslint-types/jsdoc": "47.0.2",
|
|
54
|
-
"@eslint-types/typescript-eslint": "^
|
|
54
|
+
"@eslint-types/typescript-eslint": "^7.0.2",
|
|
55
55
|
"@eslint-types/unicorn": "^51.0.1",
|
|
56
|
-
"@stylistic/eslint-plugin": "^1.6.
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "^7.0
|
|
58
|
-
"@typescript-eslint/parser": "^7.0
|
|
56
|
+
"@stylistic/eslint-plugin": "^1.6.3",
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
|
58
|
+
"@typescript-eslint/parser": "^7.2.0",
|
|
59
59
|
"eslint-config-flat-gitignore": "^0.1.3",
|
|
60
60
|
"eslint-merge-processors": "^0.1.0",
|
|
61
61
|
"eslint-plugin-antfu": "^2.1.2",
|
|
62
62
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
63
63
|
"eslint-plugin-i": "^2.29.1",
|
|
64
|
-
"eslint-plugin-jsdoc": "^48.1
|
|
64
|
+
"eslint-plugin-jsdoc": "^48.2.1",
|
|
65
65
|
"eslint-plugin-jsonc": "^2.13.0",
|
|
66
|
-
"eslint-plugin-markdown": "^
|
|
66
|
+
"eslint-plugin-markdown": "^4.0.1",
|
|
67
67
|
"eslint-plugin-n": "^16.6.2",
|
|
68
68
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
69
|
-
"eslint-plugin-perfectionist": "^2.
|
|
69
|
+
"eslint-plugin-perfectionist": "^2.6.0",
|
|
70
70
|
"eslint-plugin-toml": "^0.9.2",
|
|
71
71
|
"eslint-plugin-unicorn": "^51.0.1",
|
|
72
72
|
"eslint-plugin-unused-imports": "^3.1.0",
|
|
73
|
-
"eslint-plugin-vitest": "^0.3.
|
|
73
|
+
"eslint-plugin-vitest": "^0.3.25",
|
|
74
74
|
"eslint-plugin-yml": "^1.12.2",
|
|
75
75
|
"globals": "^14.0.0",
|
|
76
76
|
"jsonc-eslint-parser": "^2.4.0",
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@unocss/eslint-plugin": "^0.58.5",
|
|
84
|
-
"eslint": "^8.
|
|
84
|
+
"eslint": "^8.57.0",
|
|
85
85
|
"eslint-flat-config-viewer": "^0.1.11",
|
|
86
86
|
"eslint-plugin-format": "^0.1.0",
|
|
87
|
-
"eslint-plugin-tailwindcss": "^3.
|
|
87
|
+
"eslint-plugin-tailwindcss": "^3.15.0",
|
|
88
88
|
"tsup": "^8.0.2"
|
|
89
89
|
},
|
|
90
90
|
"scripts": {
|