@luxass/eslint-config 4.8.0 → 4.8.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 +26 -17
- package/dist/index.d.cts +125 -116
- package/dist/index.d.ts +125 -116
- package/dist/index.js +26 -17
- package/package.json +6 -4
package/dist/index.js
CHANGED
|
@@ -839,6 +839,9 @@ async function jsonc(options = {}) {
|
|
|
839
839
|
overrides = {},
|
|
840
840
|
stylistic: stylistic2 = true
|
|
841
841
|
} = options;
|
|
842
|
+
const {
|
|
843
|
+
indent = 2
|
|
844
|
+
} = typeof stylistic2 === "boolean" ? {} : stylistic2;
|
|
842
845
|
const [
|
|
843
846
|
pluginJsonc,
|
|
844
847
|
parserJsonc
|
|
@@ -890,7 +893,7 @@ async function jsonc(options = {}) {
|
|
|
890
893
|
"jsonc/array-bracket-spacing": ["error", "never"],
|
|
891
894
|
"jsonc/comma-dangle": ["error", "never"],
|
|
892
895
|
"jsonc/comma-style": ["error", "last"],
|
|
893
|
-
"jsonc/indent": ["error",
|
|
896
|
+
"jsonc/indent": ["error", indent],
|
|
894
897
|
"jsonc/key-spacing": [
|
|
895
898
|
"error",
|
|
896
899
|
{ afterColon: true, beforeColon: false }
|
|
@@ -1563,9 +1566,9 @@ async function test(options = {}) {
|
|
|
1563
1566
|
async function unocss(options = {}) {
|
|
1564
1567
|
const {
|
|
1565
1568
|
attributify = true,
|
|
1566
|
-
files = [GLOB_SRC],
|
|
1567
1569
|
overrides,
|
|
1568
|
-
strict = false
|
|
1570
|
+
strict = false,
|
|
1571
|
+
configPath
|
|
1569
1572
|
} = options;
|
|
1570
1573
|
await ensure([
|
|
1571
1574
|
"@unocss/eslint-plugin"
|
|
@@ -1577,14 +1580,17 @@ async function unocss(options = {}) {
|
|
|
1577
1580
|
]);
|
|
1578
1581
|
return [
|
|
1579
1582
|
{
|
|
1580
|
-
name: "luxass/unocss
|
|
1583
|
+
name: "luxass/unocss",
|
|
1581
1584
|
plugins: {
|
|
1582
1585
|
unocss: pluginUnoCSS
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1586
|
+
},
|
|
1587
|
+
settings: {
|
|
1588
|
+
...configPath != null ? {
|
|
1589
|
+
unocss: {
|
|
1590
|
+
configPath
|
|
1591
|
+
}
|
|
1592
|
+
} : {}
|
|
1593
|
+
},
|
|
1588
1594
|
rules: {
|
|
1589
1595
|
"unocss/order": "warn",
|
|
1590
1596
|
...attributify ? {
|
|
@@ -1819,8 +1825,8 @@ async function astro(options = {}) {
|
|
|
1819
1825
|
// src/configs/tailwindcss.ts
|
|
1820
1826
|
async function tailwindcss(options = {}) {
|
|
1821
1827
|
const {
|
|
1822
|
-
|
|
1823
|
-
|
|
1828
|
+
overrides,
|
|
1829
|
+
configPath
|
|
1824
1830
|
} = options;
|
|
1825
1831
|
await ensure([
|
|
1826
1832
|
"eslint-plugin-tailwindcss"
|
|
@@ -1832,7 +1838,7 @@ async function tailwindcss(options = {}) {
|
|
|
1832
1838
|
]);
|
|
1833
1839
|
return [
|
|
1834
1840
|
{
|
|
1835
|
-
name: "luxass/tailwindcss
|
|
1841
|
+
name: "luxass/tailwindcss",
|
|
1836
1842
|
languageOptions: {
|
|
1837
1843
|
parserOptions: {
|
|
1838
1844
|
ecmaFeatures: {
|
|
@@ -1840,13 +1846,16 @@ async function tailwindcss(options = {}) {
|
|
|
1840
1846
|
}
|
|
1841
1847
|
}
|
|
1842
1848
|
},
|
|
1849
|
+
settings: {
|
|
1850
|
+
...configPath != null ? {
|
|
1851
|
+
tailwindcss: {
|
|
1852
|
+
config: configPath
|
|
1853
|
+
}
|
|
1854
|
+
} : {}
|
|
1855
|
+
},
|
|
1843
1856
|
plugins: {
|
|
1844
1857
|
tailwindcss: pluginTailwindCSS
|
|
1845
|
-
}
|
|
1846
|
-
},
|
|
1847
|
-
{
|
|
1848
|
-
name: "luxass/tailwindcss/rules",
|
|
1849
|
-
files,
|
|
1858
|
+
},
|
|
1850
1859
|
rules: {
|
|
1851
1860
|
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/classnames-order.md
|
|
1852
1861
|
"tailwindcss/classnames-order": "warn",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxass/eslint-config",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.2",
|
|
4
4
|
"description": "ESLint config for @luxass",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -130,21 +130,23 @@
|
|
|
130
130
|
"@typescript-eslint/rule-tester": "^7.14.1",
|
|
131
131
|
"@unocss/eslint-plugin": "^0.61.0",
|
|
132
132
|
"astro-eslint-parser": "^1.0.2",
|
|
133
|
-
"eslint": "
|
|
133
|
+
"eslint": "^9.6.0",
|
|
134
134
|
"eslint-plugin-astro": "^1.2.2",
|
|
135
135
|
"eslint-plugin-format": "^0.1.2",
|
|
136
136
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
137
137
|
"eslint-plugin-react-refresh": "^0.4.7",
|
|
138
138
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
139
139
|
"eslint-typegen": "^0.2.4",
|
|
140
|
+
"jiti": "^1.21.6",
|
|
140
141
|
"lint-staged": "^15.2.7",
|
|
141
142
|
"prettier-plugin-astro": "^0.14.0",
|
|
142
143
|
"simple-git-hooks": "^2.11.1",
|
|
144
|
+
"tailwindcss": "^3.4.4",
|
|
143
145
|
"tsup": "^8.1.0",
|
|
144
|
-
"tsx": "^4.16.0",
|
|
145
146
|
"typescript": "^5.5.2",
|
|
147
|
+
"unocss": "^0.61.3",
|
|
146
148
|
"vitest": "^1.6.0",
|
|
147
|
-
"vue": "^3.4.
|
|
149
|
+
"vue": "^3.4.31"
|
|
148
150
|
},
|
|
149
151
|
"simple-git-hooks": {
|
|
150
152
|
"pre-commit": "pnpm lint-staged"
|