@coderwyd/eslint-config 2.1.8 → 2.2.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 +7 -18
- package/dist/cli.cjs +5 -5
- package/dist/cli.js +5 -5
- package/dist/index.cjs +58 -15
- package/dist/index.d.cts +297 -21
- package/dist/index.d.ts +297 -21
- package/dist/index.js +58 -15
- package/package.json +14 -13
package/README.md
CHANGED
|
@@ -189,6 +189,13 @@ interface OptionsConfig {
|
|
|
189
189
|
*/
|
|
190
190
|
svelte?: boolean | OptionsOverrides
|
|
191
191
|
|
|
192
|
+
/**
|
|
193
|
+
* Enable tainwindcss rules.
|
|
194
|
+
*
|
|
195
|
+
* @default auto-detect based on the dependencies
|
|
196
|
+
*/
|
|
197
|
+
tailwindcss?: boolean | OptionsOverrides
|
|
198
|
+
|
|
192
199
|
/**
|
|
193
200
|
* Enable unocss rules.
|
|
194
201
|
*
|
|
@@ -211,9 +218,6 @@ interface OptionsConfig {
|
|
|
211
218
|
/**
|
|
212
219
|
* Use external formatters to format files.
|
|
213
220
|
*
|
|
214
|
-
* Requires installing:
|
|
215
|
-
* - `eslint-plugin-prettier`
|
|
216
|
-
*
|
|
217
221
|
* @default
|
|
218
222
|
* {
|
|
219
223
|
* "html": true,
|
|
@@ -247,21 +251,6 @@ interface OptionsConfig {
|
|
|
247
251
|
* @default auto-detect based on the process.env
|
|
248
252
|
*/
|
|
249
253
|
isInEditor?: boolean
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Provide overrides for rules for each integration.
|
|
253
|
-
*
|
|
254
|
-
* @deprecated use `overrides` option in each integration key instead
|
|
255
|
-
*/
|
|
256
|
-
overrides?: {
|
|
257
|
-
javascript?: FlatConfigItem['rules']
|
|
258
|
-
typescript?: FlatConfigItem['rules']
|
|
259
|
-
test?: FlatConfigItem['rules']
|
|
260
|
-
vue?: FlatConfigItem['rules']
|
|
261
|
-
jsonc?: FlatConfigItem['rules']
|
|
262
|
-
react?: FlatConfigItem['rules']
|
|
263
|
-
svelte?: FlatConfigItem['rules']
|
|
264
|
-
}
|
|
265
254
|
}
|
|
266
255
|
```
|
|
267
256
|
|
package/dist/cli.cjs
CHANGED
|
@@ -46,17 +46,17 @@ var import_parse_gitignore = __toESM(require("parse-gitignore"), 1);
|
|
|
46
46
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
47
47
|
|
|
48
48
|
// package.json
|
|
49
|
-
var version = "2.1
|
|
49
|
+
var version = "2.2.1";
|
|
50
50
|
var devDependencies = {
|
|
51
51
|
"@antfu/ni": "^0.21.12",
|
|
52
|
-
"@types/eslint": "^8.56.
|
|
52
|
+
"@types/eslint": "^8.56.5",
|
|
53
53
|
"@types/fs-extra": "^11.0.4",
|
|
54
|
-
"@types/node": "^20.11.
|
|
54
|
+
"@types/node": "^20.11.24",
|
|
55
55
|
"@types/prompts": "^2.4.9",
|
|
56
56
|
"@types/yargs": "^17.0.32",
|
|
57
57
|
"@unocss/eslint-plugin": "^0.58.5",
|
|
58
58
|
bumpp: "^9.3.0",
|
|
59
|
-
eslint: "^8.
|
|
59
|
+
eslint: "^8.57.0",
|
|
60
60
|
"eslint-flat-config-viewer": "^0.1.11",
|
|
61
61
|
"eslint-plugin-react": "^7.33.2",
|
|
62
62
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
@@ -68,7 +68,7 @@ var devDependencies = {
|
|
|
68
68
|
"fs-extra": "^11.2.0",
|
|
69
69
|
"lint-staged": "^15.2.2",
|
|
70
70
|
rimraf: "^5.0.5",
|
|
71
|
-
"simple-git-hooks": "^2.
|
|
71
|
+
"simple-git-hooks": "^2.10.0",
|
|
72
72
|
"svelte-eslint-parser": "^0.33.1",
|
|
73
73
|
tsup: "^8.0.2",
|
|
74
74
|
typescript: "^5.3.3"
|
package/dist/cli.js
CHANGED
|
@@ -17,17 +17,17 @@ import parse from "parse-gitignore";
|
|
|
17
17
|
import c from "picocolors";
|
|
18
18
|
|
|
19
19
|
// package.json
|
|
20
|
-
var version = "2.1
|
|
20
|
+
var version = "2.2.1";
|
|
21
21
|
var devDependencies = {
|
|
22
22
|
"@antfu/ni": "^0.21.12",
|
|
23
|
-
"@types/eslint": "^8.56.
|
|
23
|
+
"@types/eslint": "^8.56.5",
|
|
24
24
|
"@types/fs-extra": "^11.0.4",
|
|
25
|
-
"@types/node": "^20.11.
|
|
25
|
+
"@types/node": "^20.11.24",
|
|
26
26
|
"@types/prompts": "^2.4.9",
|
|
27
27
|
"@types/yargs": "^17.0.32",
|
|
28
28
|
"@unocss/eslint-plugin": "^0.58.5",
|
|
29
29
|
bumpp: "^9.3.0",
|
|
30
|
-
eslint: "^8.
|
|
30
|
+
eslint: "^8.57.0",
|
|
31
31
|
"eslint-flat-config-viewer": "^0.1.11",
|
|
32
32
|
"eslint-plugin-react": "^7.33.2",
|
|
33
33
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
@@ -39,7 +39,7 @@ var devDependencies = {
|
|
|
39
39
|
"fs-extra": "^11.2.0",
|
|
40
40
|
"lint-staged": "^15.2.2",
|
|
41
41
|
rimraf: "^5.0.5",
|
|
42
|
-
"simple-git-hooks": "^2.
|
|
42
|
+
"simple-git-hooks": "^2.10.0",
|
|
43
43
|
"svelte-eslint-parser": "^0.33.1",
|
|
44
44
|
tsup: "^8.0.2",
|
|
45
45
|
typescript: "^5.3.3"
|
package/dist/index.cjs
CHANGED
|
@@ -33,9 +33,8 @@ __export(src_exports, {
|
|
|
33
33
|
defineConfig: () => defineConfig
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(src_exports);
|
|
36
|
-
var
|
|
36
|
+
var import_node_process4 = __toESM(require("process"), 1);
|
|
37
37
|
var import_node_fs = __toESM(require("fs"), 1);
|
|
38
|
-
var import_local_pkg3 = require("local-pkg");
|
|
39
38
|
|
|
40
39
|
// src/constants/prettier.ts
|
|
41
40
|
var DEFAULT_PRETTIER_RULES = {
|
|
@@ -201,7 +200,7 @@ async function imports() {
|
|
|
201
200
|
// src/configs/javascript.ts
|
|
202
201
|
var import_globals = __toESM(require("globals"), 1);
|
|
203
202
|
async function javascript(options = {}) {
|
|
204
|
-
const { isInEditor = false, overrides = {} } = options;
|
|
203
|
+
const { isInEditor: isInEditor2 = false, overrides = {} } = options;
|
|
205
204
|
return [
|
|
206
205
|
{
|
|
207
206
|
languageOptions: {
|
|
@@ -241,6 +240,8 @@ async function javascript(options = {}) {
|
|
|
241
240
|
"default-case-last": "error",
|
|
242
241
|
"dot-notation": ["error", { allowKeywords: true }],
|
|
243
242
|
eqeqeq: ["error", "smart"],
|
|
243
|
+
"for-direction": "error",
|
|
244
|
+
"getter-return": "error",
|
|
244
245
|
"new-cap": [
|
|
245
246
|
"error",
|
|
246
247
|
{ capIsNew: false, newIsCap: true, properties: true }
|
|
@@ -255,6 +256,7 @@ async function javascript(options = {}) {
|
|
|
255
256
|
"no-cond-assign": ["error", "always"],
|
|
256
257
|
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
257
258
|
"no-const-assign": "error",
|
|
259
|
+
"no-constant-condition": "error",
|
|
258
260
|
"no-control-regex": "error",
|
|
259
261
|
"no-debugger": "error",
|
|
260
262
|
"no-delete-var": "error",
|
|
@@ -419,7 +421,7 @@ async function javascript(options = {}) {
|
|
|
419
421
|
],
|
|
420
422
|
"symbol-description": "error",
|
|
421
423
|
"unicode-bom": ["error", "never"],
|
|
422
|
-
"unused-imports/no-unused-imports":
|
|
424
|
+
"unused-imports/no-unused-imports": isInEditor2 ? "off" : "error",
|
|
423
425
|
"unused-imports/no-unused-vars": [
|
|
424
426
|
"error",
|
|
425
427
|
{
|
|
@@ -540,7 +542,6 @@ function resolveSubOptions(options, key) {
|
|
|
540
542
|
function getOverrides(options, key) {
|
|
541
543
|
const sub = resolveSubOptions(options, key);
|
|
542
544
|
return {
|
|
543
|
-
...options.overrides?.[key],
|
|
544
545
|
..."overrides" in sub ? sub.overrides || {} : {}
|
|
545
546
|
};
|
|
546
547
|
}
|
|
@@ -1310,7 +1311,7 @@ async function vue(options = {}) {
|
|
|
1310
1311
|
|
|
1311
1312
|
// src/configs/test.ts
|
|
1312
1313
|
async function test(options = {}) {
|
|
1313
|
-
const { files = GLOB_TESTS, isInEditor = false, overrides = {} } = options;
|
|
1314
|
+
const { files = GLOB_TESTS, isInEditor: isInEditor2 = false, overrides = {} } = options;
|
|
1314
1315
|
const [pluginVitest, pluginNoOnlyTests] = await Promise.all([
|
|
1315
1316
|
interopDefault(import("eslint-plugin-vitest")),
|
|
1316
1317
|
// @ts-expect-error missing types
|
|
@@ -1341,7 +1342,7 @@ async function test(options = {}) {
|
|
|
1341
1342
|
],
|
|
1342
1343
|
"test/no-identical-title": "error",
|
|
1343
1344
|
"test/no-import-node-test": "error",
|
|
1344
|
-
"test/no-only-tests":
|
|
1345
|
+
"test/no-only-tests": isInEditor2 ? "off" : "error",
|
|
1345
1346
|
"test/prefer-hooks-in-order": "error",
|
|
1346
1347
|
"test/prefer-lowercase-title": "error",
|
|
1347
1348
|
...overrides
|
|
@@ -1481,7 +1482,6 @@ async function unocss(options = {}) {
|
|
|
1481
1482
|
|
|
1482
1483
|
// src/configs/formatter.ts
|
|
1483
1484
|
async function formatter(options = {}, prettierRules2 = {}) {
|
|
1484
|
-
await ensurePackages(["eslint-plugin-prettier"]);
|
|
1485
1485
|
const {
|
|
1486
1486
|
css = true,
|
|
1487
1487
|
graphql,
|
|
@@ -1656,6 +1656,41 @@ async function svelte(options = {}) {
|
|
|
1656
1656
|
];
|
|
1657
1657
|
}
|
|
1658
1658
|
|
|
1659
|
+
// src/configs/tailwindcss.ts
|
|
1660
|
+
async function tailwindcss(options = {}) {
|
|
1661
|
+
const { overrides } = options;
|
|
1662
|
+
const pluginTailwindcss = await interopDefault(
|
|
1663
|
+
import("eslint-plugin-tailwindcss")
|
|
1664
|
+
);
|
|
1665
|
+
return [
|
|
1666
|
+
{
|
|
1667
|
+
name: "coderwyd:tailwindcss",
|
|
1668
|
+
plugins: {
|
|
1669
|
+
tailwindcss: pluginTailwindcss
|
|
1670
|
+
},
|
|
1671
|
+
rules: {
|
|
1672
|
+
"tailwindcss/classnames-order": "warn",
|
|
1673
|
+
"tailwindcss/enforces-negative-arbitrary-values": "warn",
|
|
1674
|
+
"tailwindcss/enforces-shorthand": "warn",
|
|
1675
|
+
"tailwindcss/migration-from-tailwind-2": "warn",
|
|
1676
|
+
"tailwindcss/no-arbitrary-value": "off",
|
|
1677
|
+
"tailwindcss/no-contradicting-classname": "error",
|
|
1678
|
+
"tailwindcss/no-custom-classname": "off",
|
|
1679
|
+
...overrides
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
];
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
// src/env.ts
|
|
1686
|
+
var import_node_process3 = __toESM(require("process"), 1);
|
|
1687
|
+
var import_local_pkg3 = require("local-pkg");
|
|
1688
|
+
var isInEditor = !!((import_node_process3.default.env.VSCODE_PID || import_node_process3.default.env.VSCODE_CWD || import_node_process3.default.env.JETBRAINS_IDE || import_node_process3.default.env.VIM) && !import_node_process3.default.env.CI);
|
|
1689
|
+
var hasTypeScript = (0, import_local_pkg3.isPackageExists)("typescript");
|
|
1690
|
+
var hasVue = (0, import_local_pkg3.isPackageExists)("vue") || (0, import_local_pkg3.isPackageExists)("nuxt") || (0, import_local_pkg3.isPackageExists)("vitepress") || (0, import_local_pkg3.isPackageExists)("@slidev/cli");
|
|
1691
|
+
var hasUnocss = (0, import_local_pkg3.isPackageExists)("unocss") || (0, import_local_pkg3.isPackageExists)("@unocss/webpack") || (0, import_local_pkg3.isPackageExists)("@unocss/nuxt");
|
|
1692
|
+
var hasTailwindCSS = (0, import_local_pkg3.isPackageExists)("tailwindcss") && !hasUnocss;
|
|
1693
|
+
|
|
1659
1694
|
// src/index.ts
|
|
1660
1695
|
var flatConfigProps = [
|
|
1661
1696
|
"name",
|
|
@@ -1668,18 +1703,18 @@ var flatConfigProps = [
|
|
|
1668
1703
|
"rules",
|
|
1669
1704
|
"settings"
|
|
1670
1705
|
];
|
|
1671
|
-
var VuePackages = ["vue", "nuxt", "vitepress", "@slidev/cli"];
|
|
1672
1706
|
async function defineConfig(options = {}, ...userConfigs) {
|
|
1673
1707
|
const {
|
|
1674
1708
|
componentExts = [],
|
|
1675
1709
|
gitignore: enableGitignore = true,
|
|
1676
|
-
isInEditor =
|
|
1710
|
+
isInEditor: isInEditor2 = isInEditor,
|
|
1677
1711
|
react: enableReact = false,
|
|
1678
1712
|
svelte: enableSvelte = false,
|
|
1679
|
-
|
|
1713
|
+
tailwindcss: enableTailwindCSS = hasTailwindCSS,
|
|
1714
|
+
typescript: enableTypeScript = hasTypeScript,
|
|
1680
1715
|
unocss: enableUnoCSS = false,
|
|
1681
1716
|
usePrettierrc = true,
|
|
1682
|
-
vue: enableVue =
|
|
1717
|
+
vue: enableVue = hasVue
|
|
1683
1718
|
} = options;
|
|
1684
1719
|
const configs = [];
|
|
1685
1720
|
if (enableGitignore) {
|
|
@@ -1701,7 +1736,7 @@ async function defineConfig(options = {}, ...userConfigs) {
|
|
|
1701
1736
|
configs.push(
|
|
1702
1737
|
ignores(),
|
|
1703
1738
|
javascript({
|
|
1704
|
-
isInEditor,
|
|
1739
|
+
isInEditor: isInEditor2,
|
|
1705
1740
|
overrides: getOverrides(options, "javascript")
|
|
1706
1741
|
}),
|
|
1707
1742
|
comments(),
|
|
@@ -1726,7 +1761,7 @@ async function defineConfig(options = {}, ...userConfigs) {
|
|
|
1726
1761
|
if (options.test ?? true) {
|
|
1727
1762
|
configs.push(
|
|
1728
1763
|
test({
|
|
1729
|
-
isInEditor,
|
|
1764
|
+
isInEditor: isInEditor2,
|
|
1730
1765
|
overrides: getOverrides(options, "test")
|
|
1731
1766
|
})
|
|
1732
1767
|
);
|
|
@@ -1764,6 +1799,14 @@ async function defineConfig(options = {}, ...userConfigs) {
|
|
|
1764
1799
|
})
|
|
1765
1800
|
);
|
|
1766
1801
|
}
|
|
1802
|
+
if (enableTailwindCSS) {
|
|
1803
|
+
configs.push(
|
|
1804
|
+
tailwindcss({
|
|
1805
|
+
...resolveSubOptions(options, "tailwindcss"),
|
|
1806
|
+
overrides: getOverrides(options, "tailwindcss")
|
|
1807
|
+
})
|
|
1808
|
+
);
|
|
1809
|
+
}
|
|
1767
1810
|
if (options.jsonc ?? true) {
|
|
1768
1811
|
configs.push(
|
|
1769
1812
|
jsonc({
|
|
@@ -1781,7 +1824,7 @@ async function defineConfig(options = {}, ...userConfigs) {
|
|
|
1781
1824
|
}
|
|
1782
1825
|
if (usePrettierrc) {
|
|
1783
1826
|
const prettierConfig = await loadPrettierConfig(
|
|
1784
|
-
options.cwd ??
|
|
1827
|
+
options.cwd ?? import_node_process4.default.cwd()
|
|
1785
1828
|
);
|
|
1786
1829
|
Object.assign(prettierRules2, prettierConfig);
|
|
1787
1830
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,22 +1,306 @@
|
|
|
1
1
|
import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
2
2
|
import { ParserOptions } from '@typescript-eslint/parser';
|
|
3
|
-
import { FlatESLintConfigItem, MergeIntersection, RenamePrefix, TypeScriptRules, VitestRules, NRules, Prefix, ReactHooksRules, ReactRules, JSDocRules, ImportRules, EslintRules, JsoncRules, VueRules, UnicornRules, EslintCommentsRules
|
|
3
|
+
import { RuleConfig, FlatESLintConfigItem, MergeIntersection, RenamePrefix, TypeScriptRules, VitestRules, NRules, Prefix, ReactHooksRules, ReactRules, JSDocRules, ImportRules, EslintRules, JsoncRules, VueRules, UnicornRules, EslintCommentsRules } from '@antfu/eslint-define-config';
|
|
4
|
+
import { RequiredOptions, LiteralUnion, BuiltInParserName } from 'prettier';
|
|
4
5
|
import { Linter } from 'eslint';
|
|
5
6
|
import { Rules } from 'eslint-plugin-antfu';
|
|
6
|
-
import { RequiredOptions, LiteralUnion, BuiltInParserName } from 'prettier';
|
|
7
7
|
|
|
8
|
-
type PrettierCustomParser = '
|
|
9
|
-
type PrettierParser = BuiltInParserName | PrettierCustomParser
|
|
8
|
+
type PrettierCustomParser = 'toml'
|
|
9
|
+
type PrettierParser = BuiltInParserName | PrettierCustomParser
|
|
10
10
|
interface PrettierOptions extends RequiredOptions {
|
|
11
|
-
|
|
11
|
+
parser: LiteralUnion<PrettierParser>
|
|
12
|
+
}
|
|
13
|
+
type PartialPrettierExtendedOptions = Partial<PrettierOptions>
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Use Prettier to format code.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
type PrettierRuleConfig = RuleConfig<PrettierOptions>
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Use Prettier to format code.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
interface PrettierRule {
|
|
26
|
+
/**
|
|
27
|
+
* Use Prettier to format code.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
'prettier/prettier': PrettierRuleConfig
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Option.
|
|
35
|
+
*/
|
|
36
|
+
interface ClassnamesOrderOption {
|
|
37
|
+
callees?: string[]
|
|
38
|
+
ignoredKeys?: string[]
|
|
39
|
+
config?: string | Record<string, any>
|
|
40
|
+
removeDuplicates?: boolean
|
|
41
|
+
tags?: string[]
|
|
42
|
+
|
|
43
|
+
[k: string]: any
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Options.
|
|
48
|
+
*/
|
|
49
|
+
type ClassnamesOrderOptions = [ClassnamesOrderOption?]
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Enforce a consistent and logical order of the Tailwind CSS classnames.
|
|
53
|
+
* @see [classnames-order](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/classnames-order.md)
|
|
54
|
+
*/
|
|
55
|
+
type ClassnamesOrderRuleConfig = RuleConfig<ClassnamesOrderOptions>
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Enforce a consistent and logical order of the Tailwind CSS classnames.
|
|
59
|
+
* @see [classnames-order](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/classnames-order.md)
|
|
60
|
+
*/
|
|
61
|
+
interface ClassnamesOrderRule {
|
|
62
|
+
/**
|
|
63
|
+
* Enforce a consistent and logical order of the Tailwind CSS classnames.
|
|
64
|
+
* @see [classnames-order](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/classnames-order.md)
|
|
65
|
+
*/
|
|
66
|
+
'tailwindcss/classnames-order': ClassnamesOrderRuleConfig
|
|
12
67
|
}
|
|
13
|
-
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Option.
|
|
71
|
+
*/
|
|
72
|
+
interface EnforcesNegativeArbitraryValuesOption {
|
|
73
|
+
callees?: string[]
|
|
74
|
+
ignoredKeys?: string[]
|
|
75
|
+
config?: string | Record<string, any>
|
|
76
|
+
tags?: string[]
|
|
77
|
+
|
|
78
|
+
[k: string]: any
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Options.
|
|
83
|
+
*/
|
|
84
|
+
type EnforcesNegativeArbitraryValuesOptions = [
|
|
85
|
+
EnforcesNegativeArbitraryValuesOption?,
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Warns about dash prefixed classnames using arbitrary values.
|
|
90
|
+
* @see [enforces-negative-arbitrary-values](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-negative-arbitrary-values.md)
|
|
91
|
+
*/
|
|
92
|
+
type EnforcesNegativeArbitraryValuesRuleConfig =
|
|
93
|
+
RuleConfig<EnforcesNegativeArbitraryValuesOptions>
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Warns about dash prefixed classnames using arbitrary values.
|
|
97
|
+
* @see [enforces-negative-arbitrary-values](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-negative-arbitrary-values.md)
|
|
98
|
+
*/
|
|
99
|
+
interface EnforcesNegativeArbitraryValuesRule {
|
|
100
|
+
/**
|
|
101
|
+
* Warns about dash prefixed classnames using arbitrary values.
|
|
102
|
+
* @see [enforces-negative-arbitrary-values](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-negative-arbitrary-values.md)
|
|
103
|
+
*/
|
|
104
|
+
'tailwindcss/enforces-negative-arbitrary-values': EnforcesNegativeArbitraryValuesRuleConfig
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Option.
|
|
109
|
+
*/
|
|
110
|
+
interface EnforcesShorthandOption {
|
|
111
|
+
callees?: string[]
|
|
112
|
+
ignoredKeys?: string[]
|
|
113
|
+
config?: string | Record<string, any>
|
|
114
|
+
tags?: string[]
|
|
115
|
+
|
|
116
|
+
[k: string]: any
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Options.
|
|
121
|
+
*/
|
|
122
|
+
type EnforcesShorthandOptions = [EnforcesShorthandOption?]
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Enforces the usage of shorthand Tailwind CSS classnames.
|
|
126
|
+
* @see [enforces-shorthand](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-shorthand.md)
|
|
127
|
+
*/
|
|
128
|
+
type EnforcesShorthandRuleConfig = RuleConfig<EnforcesShorthandOptions>
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Enforces the usage of shorthand Tailwind CSS classnames.
|
|
132
|
+
* @see [enforces-shorthand](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-shorthand.md)
|
|
133
|
+
*/
|
|
134
|
+
interface EnforcesShorthandRule {
|
|
135
|
+
/**
|
|
136
|
+
* Enforces the usage of shorthand Tailwind CSS classnames.
|
|
137
|
+
* @see [enforces-shorthand](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-shorthand.md)
|
|
138
|
+
*/
|
|
139
|
+
'tailwindcss/enforces-shorthand': EnforcesShorthandRuleConfig
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Option.
|
|
144
|
+
*/
|
|
145
|
+
interface MigrationFromTailwind_2Option {
|
|
146
|
+
callees?: string[]
|
|
147
|
+
ignoredKeys?: string[]
|
|
148
|
+
config?: string | Record<string, any>
|
|
149
|
+
tags?: string[]
|
|
150
|
+
|
|
151
|
+
[k: string]: any
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Options.
|
|
156
|
+
*/
|
|
157
|
+
type MigrationFromTailwind_2Options = [MigrationFromTailwind_2Option?]
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Detect obsolete classnames when upgrading to Tailwind CSS v3.
|
|
161
|
+
* @see [migration-from-tailwind-2](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/migration-from-tailwind-2.md)
|
|
162
|
+
*/
|
|
163
|
+
type MigrationFromTailwind_2RuleConfig =
|
|
164
|
+
RuleConfig<MigrationFromTailwind_2Options>
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Detect obsolete classnames when upgrading to Tailwind CSS v3.
|
|
168
|
+
* @see [migration-from-tailwind-2](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/migration-from-tailwind-2.md)
|
|
169
|
+
*/
|
|
170
|
+
interface MigrationFromTailwind_2Rule {
|
|
171
|
+
/**
|
|
172
|
+
* Detect obsolete classnames when upgrading to Tailwind CSS v3.
|
|
173
|
+
* @see [migration-from-tailwind-2](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/migration-from-tailwind-2.md)
|
|
174
|
+
*/
|
|
175
|
+
'tailwindcss/migration-from-tailwind-2': MigrationFromTailwind_2RuleConfig
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Option.
|
|
180
|
+
*/
|
|
181
|
+
interface NoArbitraryValueOption {
|
|
182
|
+
callees?: string[]
|
|
183
|
+
ignoredKeys?: string[]
|
|
184
|
+
config?: string | Record<string, any>
|
|
185
|
+
tags?: string[]
|
|
186
|
+
|
|
187
|
+
[k: string]: any
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Options.
|
|
192
|
+
*/
|
|
193
|
+
type NoArbitraryValueOptions = [NoArbitraryValueOption?]
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Forbid using arbitrary values in classnames.
|
|
197
|
+
* @see [no-arbitrary-value](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-arbitrary-value.md)
|
|
198
|
+
*/
|
|
199
|
+
type NoArbitraryValueRuleConfig = RuleConfig<NoArbitraryValueOptions>
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Forbid using arbitrary values in classnames.
|
|
203
|
+
* @see [no-arbitrary-value](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-arbitrary-value.md)
|
|
204
|
+
*/
|
|
205
|
+
interface NoArbitraryValueRule {
|
|
206
|
+
/**
|
|
207
|
+
* Forbid using arbitrary values in classnames.
|
|
208
|
+
* @see [no-arbitrary-value](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-arbitrary-value.md)
|
|
209
|
+
*/
|
|
210
|
+
'tailwindcss/no-arbitrary-value': NoArbitraryValueRuleConfig
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Option.
|
|
215
|
+
*/
|
|
216
|
+
interface NoContradictingClassnameOption {
|
|
217
|
+
callees?: string[]
|
|
218
|
+
ignoredKeys?: string[]
|
|
219
|
+
config?: string | Record<string, any>
|
|
220
|
+
tags?: string[]
|
|
221
|
+
|
|
222
|
+
[k: string]: any
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Options.
|
|
227
|
+
*/
|
|
228
|
+
type NoContradictingClassnameOptions = [NoContradictingClassnameOption?]
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Avoid contradicting Tailwind CSS classnames (e.g. "w-3 w-5").
|
|
232
|
+
* @see [no-contradicting-classname](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-contradicting-classname.md)
|
|
233
|
+
*/
|
|
234
|
+
type NoContradictingClassnameRuleConfig =
|
|
235
|
+
RuleConfig<NoContradictingClassnameOptions>
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Avoid contradicting Tailwind CSS classnames (e.g. "w-3 w-5").
|
|
239
|
+
* @see [no-contradicting-classname](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-contradicting-classname.md)
|
|
240
|
+
*/
|
|
241
|
+
interface NoContradictingClassnameRule {
|
|
242
|
+
/**
|
|
243
|
+
* Avoid contradicting Tailwind CSS classnames (e.g. "w-3 w-5").
|
|
244
|
+
* @see [no-contradicting-classname](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-contradicting-classname.md)
|
|
245
|
+
*/
|
|
246
|
+
'tailwindcss/no-contradicting-classname': NoContradictingClassnameRuleConfig
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Option.
|
|
251
|
+
*/
|
|
252
|
+
interface NoCustomClassnameOption {
|
|
253
|
+
callees?: string[]
|
|
254
|
+
ignoredKeys?: string[]
|
|
255
|
+
config?: string | Record<string, any>
|
|
256
|
+
cssFiles?: string[]
|
|
257
|
+
cssFilesRefreshRate?: number
|
|
258
|
+
tags?: string[]
|
|
259
|
+
whitelist?: string[]
|
|
260
|
+
|
|
261
|
+
[k: string]: any
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Options.
|
|
266
|
+
*/
|
|
267
|
+
type NoCustomClassnameOptions = [NoCustomClassnameOption?]
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Detect classnames which do not belong to Tailwind CSS.
|
|
271
|
+
* @see [no-custom-classname](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-custom-classname.md)
|
|
272
|
+
*/
|
|
273
|
+
type NoCustomClassnameRuleConfig = RuleConfig<NoCustomClassnameOptions>
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Detect classnames which do not belong to Tailwind CSS.
|
|
277
|
+
* @see [no-custom-classname](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-custom-classname.md)
|
|
278
|
+
*/
|
|
279
|
+
interface NoCustomClassnameRule {
|
|
280
|
+
/**
|
|
281
|
+
* Detect classnames which do not belong to Tailwind CSS.
|
|
282
|
+
* @see [no-custom-classname](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-custom-classname.md)
|
|
283
|
+
*/
|
|
284
|
+
'tailwindcss/no-custom-classname': NoCustomClassnameRuleConfig
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* All TailwindCss rules.
|
|
289
|
+
*/
|
|
290
|
+
type TailwindCssRules = ClassnamesOrderRule &
|
|
291
|
+
EnforcesNegativeArbitraryValuesRule &
|
|
292
|
+
EnforcesShorthandRule &
|
|
293
|
+
MigrationFromTailwind_2Rule &
|
|
294
|
+
NoArbitraryValueRule &
|
|
295
|
+
NoContradictingClassnameRule &
|
|
296
|
+
NoCustomClassnameRule
|
|
297
|
+
|
|
14
298
|
type WrapRuleConfig<T extends {
|
|
15
299
|
[key: string]: any;
|
|
16
300
|
}> = {
|
|
17
301
|
[K in keyof T]: T[K] extends RuleConfig ? T[K] : RuleConfig<T[K]>;
|
|
18
302
|
};
|
|
19
|
-
type EslintFlatRules = WrapRuleConfig<MergeIntersection<RenamePrefix<TypeScriptRules, '@typescript-eslint/', 'ts/'> & RenamePrefix<VitestRules, 'vitest/', 'test/'> & RenamePrefix<NRules, 'n/', 'node/'> & Prefix<Rules, 'antfu/'> & ReactHooksRules & ReactRules & JSDocRules & ImportRules & EslintRules & JsoncRules & VueRules & UnicornRules & EslintCommentsRules & {
|
|
303
|
+
type EslintFlatRules = WrapRuleConfig<MergeIntersection<RenamePrefix<TypeScriptRules, '@typescript-eslint/', 'ts/'> & RenamePrefix<VitestRules, 'vitest/', 'test/'> & RenamePrefix<NRules, 'n/', 'node/'> & Prefix<Rules, 'antfu/'> & ReactHooksRules & ReactRules & JSDocRules & ImportRules & EslintRules & JsoncRules & VueRules & UnicornRules & PrettierRule & TailwindCssRules & EslintCommentsRules & {
|
|
20
304
|
'test/no-only-tests': RuleConfig<[]>;
|
|
21
305
|
}>>;
|
|
22
306
|
type FlatConfigItem = Omit<FlatESLintConfigItem<EslintFlatRules, false>, 'plugins'> & {
|
|
@@ -177,6 +461,12 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
177
461
|
* @default false
|
|
178
462
|
*/
|
|
179
463
|
svelte?: boolean | OptionsOverrides;
|
|
464
|
+
/**
|
|
465
|
+
* Enable tainwindcss rules.
|
|
466
|
+
*
|
|
467
|
+
* @default auto-detect based on the dependencies
|
|
468
|
+
*/
|
|
469
|
+
tailwindcss?: boolean | OptionsOverrides;
|
|
180
470
|
/**
|
|
181
471
|
* Enable unocss rules.
|
|
182
472
|
*
|
|
@@ -231,20 +521,6 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
231
521
|
* @default auto-detect based on the process.env
|
|
232
522
|
*/
|
|
233
523
|
isInEditor?: boolean;
|
|
234
|
-
/**
|
|
235
|
-
* Provide overrides for rules for each integration.
|
|
236
|
-
*
|
|
237
|
-
* @deprecated use `overrides` option in each integration key instead
|
|
238
|
-
*/
|
|
239
|
-
overrides?: {
|
|
240
|
-
javascript?: FlatConfigItem['rules'];
|
|
241
|
-
typescript?: FlatConfigItem['rules'];
|
|
242
|
-
test?: FlatConfigItem['rules'];
|
|
243
|
-
vue?: FlatConfigItem['rules'];
|
|
244
|
-
jsonc?: FlatConfigItem['rules'];
|
|
245
|
-
react?: FlatConfigItem['rules'];
|
|
246
|
-
svelte?: FlatConfigItem['rules'];
|
|
247
|
-
};
|
|
248
524
|
}
|
|
249
525
|
|
|
250
526
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,306 @@
|
|
|
1
1
|
import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
2
2
|
import { ParserOptions } from '@typescript-eslint/parser';
|
|
3
|
-
import { FlatESLintConfigItem, MergeIntersection, RenamePrefix, TypeScriptRules, VitestRules, NRules, Prefix, ReactHooksRules, ReactRules, JSDocRules, ImportRules, EslintRules, JsoncRules, VueRules, UnicornRules, EslintCommentsRules
|
|
3
|
+
import { RuleConfig, FlatESLintConfigItem, MergeIntersection, RenamePrefix, TypeScriptRules, VitestRules, NRules, Prefix, ReactHooksRules, ReactRules, JSDocRules, ImportRules, EslintRules, JsoncRules, VueRules, UnicornRules, EslintCommentsRules } from '@antfu/eslint-define-config';
|
|
4
|
+
import { RequiredOptions, LiteralUnion, BuiltInParserName } from 'prettier';
|
|
4
5
|
import { Linter } from 'eslint';
|
|
5
6
|
import { Rules } from 'eslint-plugin-antfu';
|
|
6
|
-
import { RequiredOptions, LiteralUnion, BuiltInParserName } from 'prettier';
|
|
7
7
|
|
|
8
|
-
type PrettierCustomParser = '
|
|
9
|
-
type PrettierParser = BuiltInParserName | PrettierCustomParser
|
|
8
|
+
type PrettierCustomParser = 'toml'
|
|
9
|
+
type PrettierParser = BuiltInParserName | PrettierCustomParser
|
|
10
10
|
interface PrettierOptions extends RequiredOptions {
|
|
11
|
-
|
|
11
|
+
parser: LiteralUnion<PrettierParser>
|
|
12
|
+
}
|
|
13
|
+
type PartialPrettierExtendedOptions = Partial<PrettierOptions>
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Use Prettier to format code.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
type PrettierRuleConfig = RuleConfig<PrettierOptions>
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Use Prettier to format code.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
interface PrettierRule {
|
|
26
|
+
/**
|
|
27
|
+
* Use Prettier to format code.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
'prettier/prettier': PrettierRuleConfig
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Option.
|
|
35
|
+
*/
|
|
36
|
+
interface ClassnamesOrderOption {
|
|
37
|
+
callees?: string[]
|
|
38
|
+
ignoredKeys?: string[]
|
|
39
|
+
config?: string | Record<string, any>
|
|
40
|
+
removeDuplicates?: boolean
|
|
41
|
+
tags?: string[]
|
|
42
|
+
|
|
43
|
+
[k: string]: any
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Options.
|
|
48
|
+
*/
|
|
49
|
+
type ClassnamesOrderOptions = [ClassnamesOrderOption?]
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Enforce a consistent and logical order of the Tailwind CSS classnames.
|
|
53
|
+
* @see [classnames-order](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/classnames-order.md)
|
|
54
|
+
*/
|
|
55
|
+
type ClassnamesOrderRuleConfig = RuleConfig<ClassnamesOrderOptions>
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Enforce a consistent and logical order of the Tailwind CSS classnames.
|
|
59
|
+
* @see [classnames-order](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/classnames-order.md)
|
|
60
|
+
*/
|
|
61
|
+
interface ClassnamesOrderRule {
|
|
62
|
+
/**
|
|
63
|
+
* Enforce a consistent and logical order of the Tailwind CSS classnames.
|
|
64
|
+
* @see [classnames-order](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/classnames-order.md)
|
|
65
|
+
*/
|
|
66
|
+
'tailwindcss/classnames-order': ClassnamesOrderRuleConfig
|
|
12
67
|
}
|
|
13
|
-
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Option.
|
|
71
|
+
*/
|
|
72
|
+
interface EnforcesNegativeArbitraryValuesOption {
|
|
73
|
+
callees?: string[]
|
|
74
|
+
ignoredKeys?: string[]
|
|
75
|
+
config?: string | Record<string, any>
|
|
76
|
+
tags?: string[]
|
|
77
|
+
|
|
78
|
+
[k: string]: any
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Options.
|
|
83
|
+
*/
|
|
84
|
+
type EnforcesNegativeArbitraryValuesOptions = [
|
|
85
|
+
EnforcesNegativeArbitraryValuesOption?,
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Warns about dash prefixed classnames using arbitrary values.
|
|
90
|
+
* @see [enforces-negative-arbitrary-values](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-negative-arbitrary-values.md)
|
|
91
|
+
*/
|
|
92
|
+
type EnforcesNegativeArbitraryValuesRuleConfig =
|
|
93
|
+
RuleConfig<EnforcesNegativeArbitraryValuesOptions>
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Warns about dash prefixed classnames using arbitrary values.
|
|
97
|
+
* @see [enforces-negative-arbitrary-values](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-negative-arbitrary-values.md)
|
|
98
|
+
*/
|
|
99
|
+
interface EnforcesNegativeArbitraryValuesRule {
|
|
100
|
+
/**
|
|
101
|
+
* Warns about dash prefixed classnames using arbitrary values.
|
|
102
|
+
* @see [enforces-negative-arbitrary-values](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-negative-arbitrary-values.md)
|
|
103
|
+
*/
|
|
104
|
+
'tailwindcss/enforces-negative-arbitrary-values': EnforcesNegativeArbitraryValuesRuleConfig
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Option.
|
|
109
|
+
*/
|
|
110
|
+
interface EnforcesShorthandOption {
|
|
111
|
+
callees?: string[]
|
|
112
|
+
ignoredKeys?: string[]
|
|
113
|
+
config?: string | Record<string, any>
|
|
114
|
+
tags?: string[]
|
|
115
|
+
|
|
116
|
+
[k: string]: any
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Options.
|
|
121
|
+
*/
|
|
122
|
+
type EnforcesShorthandOptions = [EnforcesShorthandOption?]
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Enforces the usage of shorthand Tailwind CSS classnames.
|
|
126
|
+
* @see [enforces-shorthand](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-shorthand.md)
|
|
127
|
+
*/
|
|
128
|
+
type EnforcesShorthandRuleConfig = RuleConfig<EnforcesShorthandOptions>
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Enforces the usage of shorthand Tailwind CSS classnames.
|
|
132
|
+
* @see [enforces-shorthand](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-shorthand.md)
|
|
133
|
+
*/
|
|
134
|
+
interface EnforcesShorthandRule {
|
|
135
|
+
/**
|
|
136
|
+
* Enforces the usage of shorthand Tailwind CSS classnames.
|
|
137
|
+
* @see [enforces-shorthand](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-shorthand.md)
|
|
138
|
+
*/
|
|
139
|
+
'tailwindcss/enforces-shorthand': EnforcesShorthandRuleConfig
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Option.
|
|
144
|
+
*/
|
|
145
|
+
interface MigrationFromTailwind_2Option {
|
|
146
|
+
callees?: string[]
|
|
147
|
+
ignoredKeys?: string[]
|
|
148
|
+
config?: string | Record<string, any>
|
|
149
|
+
tags?: string[]
|
|
150
|
+
|
|
151
|
+
[k: string]: any
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Options.
|
|
156
|
+
*/
|
|
157
|
+
type MigrationFromTailwind_2Options = [MigrationFromTailwind_2Option?]
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Detect obsolete classnames when upgrading to Tailwind CSS v3.
|
|
161
|
+
* @see [migration-from-tailwind-2](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/migration-from-tailwind-2.md)
|
|
162
|
+
*/
|
|
163
|
+
type MigrationFromTailwind_2RuleConfig =
|
|
164
|
+
RuleConfig<MigrationFromTailwind_2Options>
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Detect obsolete classnames when upgrading to Tailwind CSS v3.
|
|
168
|
+
* @see [migration-from-tailwind-2](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/migration-from-tailwind-2.md)
|
|
169
|
+
*/
|
|
170
|
+
interface MigrationFromTailwind_2Rule {
|
|
171
|
+
/**
|
|
172
|
+
* Detect obsolete classnames when upgrading to Tailwind CSS v3.
|
|
173
|
+
* @see [migration-from-tailwind-2](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/migration-from-tailwind-2.md)
|
|
174
|
+
*/
|
|
175
|
+
'tailwindcss/migration-from-tailwind-2': MigrationFromTailwind_2RuleConfig
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Option.
|
|
180
|
+
*/
|
|
181
|
+
interface NoArbitraryValueOption {
|
|
182
|
+
callees?: string[]
|
|
183
|
+
ignoredKeys?: string[]
|
|
184
|
+
config?: string | Record<string, any>
|
|
185
|
+
tags?: string[]
|
|
186
|
+
|
|
187
|
+
[k: string]: any
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Options.
|
|
192
|
+
*/
|
|
193
|
+
type NoArbitraryValueOptions = [NoArbitraryValueOption?]
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Forbid using arbitrary values in classnames.
|
|
197
|
+
* @see [no-arbitrary-value](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-arbitrary-value.md)
|
|
198
|
+
*/
|
|
199
|
+
type NoArbitraryValueRuleConfig = RuleConfig<NoArbitraryValueOptions>
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Forbid using arbitrary values in classnames.
|
|
203
|
+
* @see [no-arbitrary-value](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-arbitrary-value.md)
|
|
204
|
+
*/
|
|
205
|
+
interface NoArbitraryValueRule {
|
|
206
|
+
/**
|
|
207
|
+
* Forbid using arbitrary values in classnames.
|
|
208
|
+
* @see [no-arbitrary-value](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-arbitrary-value.md)
|
|
209
|
+
*/
|
|
210
|
+
'tailwindcss/no-arbitrary-value': NoArbitraryValueRuleConfig
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Option.
|
|
215
|
+
*/
|
|
216
|
+
interface NoContradictingClassnameOption {
|
|
217
|
+
callees?: string[]
|
|
218
|
+
ignoredKeys?: string[]
|
|
219
|
+
config?: string | Record<string, any>
|
|
220
|
+
tags?: string[]
|
|
221
|
+
|
|
222
|
+
[k: string]: any
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Options.
|
|
227
|
+
*/
|
|
228
|
+
type NoContradictingClassnameOptions = [NoContradictingClassnameOption?]
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Avoid contradicting Tailwind CSS classnames (e.g. "w-3 w-5").
|
|
232
|
+
* @see [no-contradicting-classname](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-contradicting-classname.md)
|
|
233
|
+
*/
|
|
234
|
+
type NoContradictingClassnameRuleConfig =
|
|
235
|
+
RuleConfig<NoContradictingClassnameOptions>
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Avoid contradicting Tailwind CSS classnames (e.g. "w-3 w-5").
|
|
239
|
+
* @see [no-contradicting-classname](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-contradicting-classname.md)
|
|
240
|
+
*/
|
|
241
|
+
interface NoContradictingClassnameRule {
|
|
242
|
+
/**
|
|
243
|
+
* Avoid contradicting Tailwind CSS classnames (e.g. "w-3 w-5").
|
|
244
|
+
* @see [no-contradicting-classname](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-contradicting-classname.md)
|
|
245
|
+
*/
|
|
246
|
+
'tailwindcss/no-contradicting-classname': NoContradictingClassnameRuleConfig
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Option.
|
|
251
|
+
*/
|
|
252
|
+
interface NoCustomClassnameOption {
|
|
253
|
+
callees?: string[]
|
|
254
|
+
ignoredKeys?: string[]
|
|
255
|
+
config?: string | Record<string, any>
|
|
256
|
+
cssFiles?: string[]
|
|
257
|
+
cssFilesRefreshRate?: number
|
|
258
|
+
tags?: string[]
|
|
259
|
+
whitelist?: string[]
|
|
260
|
+
|
|
261
|
+
[k: string]: any
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Options.
|
|
266
|
+
*/
|
|
267
|
+
type NoCustomClassnameOptions = [NoCustomClassnameOption?]
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Detect classnames which do not belong to Tailwind CSS.
|
|
271
|
+
* @see [no-custom-classname](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-custom-classname.md)
|
|
272
|
+
*/
|
|
273
|
+
type NoCustomClassnameRuleConfig = RuleConfig<NoCustomClassnameOptions>
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Detect classnames which do not belong to Tailwind CSS.
|
|
277
|
+
* @see [no-custom-classname](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-custom-classname.md)
|
|
278
|
+
*/
|
|
279
|
+
interface NoCustomClassnameRule {
|
|
280
|
+
/**
|
|
281
|
+
* Detect classnames which do not belong to Tailwind CSS.
|
|
282
|
+
* @see [no-custom-classname](https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-custom-classname.md)
|
|
283
|
+
*/
|
|
284
|
+
'tailwindcss/no-custom-classname': NoCustomClassnameRuleConfig
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* All TailwindCss rules.
|
|
289
|
+
*/
|
|
290
|
+
type TailwindCssRules = ClassnamesOrderRule &
|
|
291
|
+
EnforcesNegativeArbitraryValuesRule &
|
|
292
|
+
EnforcesShorthandRule &
|
|
293
|
+
MigrationFromTailwind_2Rule &
|
|
294
|
+
NoArbitraryValueRule &
|
|
295
|
+
NoContradictingClassnameRule &
|
|
296
|
+
NoCustomClassnameRule
|
|
297
|
+
|
|
14
298
|
type WrapRuleConfig<T extends {
|
|
15
299
|
[key: string]: any;
|
|
16
300
|
}> = {
|
|
17
301
|
[K in keyof T]: T[K] extends RuleConfig ? T[K] : RuleConfig<T[K]>;
|
|
18
302
|
};
|
|
19
|
-
type EslintFlatRules = WrapRuleConfig<MergeIntersection<RenamePrefix<TypeScriptRules, '@typescript-eslint/', 'ts/'> & RenamePrefix<VitestRules, 'vitest/', 'test/'> & RenamePrefix<NRules, 'n/', 'node/'> & Prefix<Rules, 'antfu/'> & ReactHooksRules & ReactRules & JSDocRules & ImportRules & EslintRules & JsoncRules & VueRules & UnicornRules & EslintCommentsRules & {
|
|
303
|
+
type EslintFlatRules = WrapRuleConfig<MergeIntersection<RenamePrefix<TypeScriptRules, '@typescript-eslint/', 'ts/'> & RenamePrefix<VitestRules, 'vitest/', 'test/'> & RenamePrefix<NRules, 'n/', 'node/'> & Prefix<Rules, 'antfu/'> & ReactHooksRules & ReactRules & JSDocRules & ImportRules & EslintRules & JsoncRules & VueRules & UnicornRules & PrettierRule & TailwindCssRules & EslintCommentsRules & {
|
|
20
304
|
'test/no-only-tests': RuleConfig<[]>;
|
|
21
305
|
}>>;
|
|
22
306
|
type FlatConfigItem = Omit<FlatESLintConfigItem<EslintFlatRules, false>, 'plugins'> & {
|
|
@@ -177,6 +461,12 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
177
461
|
* @default false
|
|
178
462
|
*/
|
|
179
463
|
svelte?: boolean | OptionsOverrides;
|
|
464
|
+
/**
|
|
465
|
+
* Enable tainwindcss rules.
|
|
466
|
+
*
|
|
467
|
+
* @default auto-detect based on the dependencies
|
|
468
|
+
*/
|
|
469
|
+
tailwindcss?: boolean | OptionsOverrides;
|
|
180
470
|
/**
|
|
181
471
|
* Enable unocss rules.
|
|
182
472
|
*
|
|
@@ -231,20 +521,6 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
231
521
|
* @default auto-detect based on the process.env
|
|
232
522
|
*/
|
|
233
523
|
isInEditor?: boolean;
|
|
234
|
-
/**
|
|
235
|
-
* Provide overrides for rules for each integration.
|
|
236
|
-
*
|
|
237
|
-
* @deprecated use `overrides` option in each integration key instead
|
|
238
|
-
*/
|
|
239
|
-
overrides?: {
|
|
240
|
-
javascript?: FlatConfigItem['rules'];
|
|
241
|
-
typescript?: FlatConfigItem['rules'];
|
|
242
|
-
test?: FlatConfigItem['rules'];
|
|
243
|
-
vue?: FlatConfigItem['rules'];
|
|
244
|
-
jsonc?: FlatConfigItem['rules'];
|
|
245
|
-
react?: FlatConfigItem['rules'];
|
|
246
|
-
svelte?: FlatConfigItem['rules'];
|
|
247
|
-
};
|
|
248
524
|
}
|
|
249
525
|
|
|
250
526
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import
|
|
2
|
+
import process4 from "node:process";
|
|
3
3
|
import fs from "node:fs";
|
|
4
|
-
import { isPackageExists as isPackageExists3 } from "local-pkg";
|
|
5
4
|
|
|
6
5
|
// src/constants/prettier.ts
|
|
7
6
|
var DEFAULT_PRETTIER_RULES = {
|
|
@@ -167,7 +166,7 @@ async function imports() {
|
|
|
167
166
|
// src/configs/javascript.ts
|
|
168
167
|
import globals from "globals";
|
|
169
168
|
async function javascript(options = {}) {
|
|
170
|
-
const { isInEditor = false, overrides = {} } = options;
|
|
169
|
+
const { isInEditor: isInEditor2 = false, overrides = {} } = options;
|
|
171
170
|
return [
|
|
172
171
|
{
|
|
173
172
|
languageOptions: {
|
|
@@ -207,6 +206,8 @@ async function javascript(options = {}) {
|
|
|
207
206
|
"default-case-last": "error",
|
|
208
207
|
"dot-notation": ["error", { allowKeywords: true }],
|
|
209
208
|
eqeqeq: ["error", "smart"],
|
|
209
|
+
"for-direction": "error",
|
|
210
|
+
"getter-return": "error",
|
|
210
211
|
"new-cap": [
|
|
211
212
|
"error",
|
|
212
213
|
{ capIsNew: false, newIsCap: true, properties: true }
|
|
@@ -221,6 +222,7 @@ async function javascript(options = {}) {
|
|
|
221
222
|
"no-cond-assign": ["error", "always"],
|
|
222
223
|
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
223
224
|
"no-const-assign": "error",
|
|
225
|
+
"no-constant-condition": "error",
|
|
224
226
|
"no-control-regex": "error",
|
|
225
227
|
"no-debugger": "error",
|
|
226
228
|
"no-delete-var": "error",
|
|
@@ -385,7 +387,7 @@ async function javascript(options = {}) {
|
|
|
385
387
|
],
|
|
386
388
|
"symbol-description": "error",
|
|
387
389
|
"unicode-bom": ["error", "never"],
|
|
388
|
-
"unused-imports/no-unused-imports":
|
|
390
|
+
"unused-imports/no-unused-imports": isInEditor2 ? "off" : "error",
|
|
389
391
|
"unused-imports/no-unused-vars": [
|
|
390
392
|
"error",
|
|
391
393
|
{
|
|
@@ -506,7 +508,6 @@ function resolveSubOptions(options, key) {
|
|
|
506
508
|
function getOverrides(options, key) {
|
|
507
509
|
const sub = resolveSubOptions(options, key);
|
|
508
510
|
return {
|
|
509
|
-
...options.overrides?.[key],
|
|
510
511
|
..."overrides" in sub ? sub.overrides || {} : {}
|
|
511
512
|
};
|
|
512
513
|
}
|
|
@@ -1276,7 +1277,7 @@ async function vue(options = {}) {
|
|
|
1276
1277
|
|
|
1277
1278
|
// src/configs/test.ts
|
|
1278
1279
|
async function test(options = {}) {
|
|
1279
|
-
const { files = GLOB_TESTS, isInEditor = false, overrides = {} } = options;
|
|
1280
|
+
const { files = GLOB_TESTS, isInEditor: isInEditor2 = false, overrides = {} } = options;
|
|
1280
1281
|
const [pluginVitest, pluginNoOnlyTests] = await Promise.all([
|
|
1281
1282
|
interopDefault(import("eslint-plugin-vitest")),
|
|
1282
1283
|
// @ts-expect-error missing types
|
|
@@ -1307,7 +1308,7 @@ async function test(options = {}) {
|
|
|
1307
1308
|
],
|
|
1308
1309
|
"test/no-identical-title": "error",
|
|
1309
1310
|
"test/no-import-node-test": "error",
|
|
1310
|
-
"test/no-only-tests":
|
|
1311
|
+
"test/no-only-tests": isInEditor2 ? "off" : "error",
|
|
1311
1312
|
"test/prefer-hooks-in-order": "error",
|
|
1312
1313
|
"test/prefer-lowercase-title": "error",
|
|
1313
1314
|
...overrides
|
|
@@ -1447,7 +1448,6 @@ async function unocss(options = {}) {
|
|
|
1447
1448
|
|
|
1448
1449
|
// src/configs/formatter.ts
|
|
1449
1450
|
async function formatter(options = {}, prettierRules2 = {}) {
|
|
1450
|
-
await ensurePackages(["eslint-plugin-prettier"]);
|
|
1451
1451
|
const {
|
|
1452
1452
|
css = true,
|
|
1453
1453
|
graphql,
|
|
@@ -1622,6 +1622,41 @@ async function svelte(options = {}) {
|
|
|
1622
1622
|
];
|
|
1623
1623
|
}
|
|
1624
1624
|
|
|
1625
|
+
// src/configs/tailwindcss.ts
|
|
1626
|
+
async function tailwindcss(options = {}) {
|
|
1627
|
+
const { overrides } = options;
|
|
1628
|
+
const pluginTailwindcss = await interopDefault(
|
|
1629
|
+
import("eslint-plugin-tailwindcss")
|
|
1630
|
+
);
|
|
1631
|
+
return [
|
|
1632
|
+
{
|
|
1633
|
+
name: "coderwyd:tailwindcss",
|
|
1634
|
+
plugins: {
|
|
1635
|
+
tailwindcss: pluginTailwindcss
|
|
1636
|
+
},
|
|
1637
|
+
rules: {
|
|
1638
|
+
"tailwindcss/classnames-order": "warn",
|
|
1639
|
+
"tailwindcss/enforces-negative-arbitrary-values": "warn",
|
|
1640
|
+
"tailwindcss/enforces-shorthand": "warn",
|
|
1641
|
+
"tailwindcss/migration-from-tailwind-2": "warn",
|
|
1642
|
+
"tailwindcss/no-arbitrary-value": "off",
|
|
1643
|
+
"tailwindcss/no-contradicting-classname": "error",
|
|
1644
|
+
"tailwindcss/no-custom-classname": "off",
|
|
1645
|
+
...overrides
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
];
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
// src/env.ts
|
|
1652
|
+
import process3 from "node:process";
|
|
1653
|
+
import { isPackageExists as isPackageExists3 } from "local-pkg";
|
|
1654
|
+
var isInEditor = !!((process3.env.VSCODE_PID || process3.env.VSCODE_CWD || process3.env.JETBRAINS_IDE || process3.env.VIM) && !process3.env.CI);
|
|
1655
|
+
var hasTypeScript = isPackageExists3("typescript");
|
|
1656
|
+
var hasVue = isPackageExists3("vue") || isPackageExists3("nuxt") || isPackageExists3("vitepress") || isPackageExists3("@slidev/cli");
|
|
1657
|
+
var hasUnocss = isPackageExists3("unocss") || isPackageExists3("@unocss/webpack") || isPackageExists3("@unocss/nuxt");
|
|
1658
|
+
var hasTailwindCSS = isPackageExists3("tailwindcss") && !hasUnocss;
|
|
1659
|
+
|
|
1625
1660
|
// src/index.ts
|
|
1626
1661
|
var flatConfigProps = [
|
|
1627
1662
|
"name",
|
|
@@ -1634,18 +1669,18 @@ var flatConfigProps = [
|
|
|
1634
1669
|
"rules",
|
|
1635
1670
|
"settings"
|
|
1636
1671
|
];
|
|
1637
|
-
var VuePackages = ["vue", "nuxt", "vitepress", "@slidev/cli"];
|
|
1638
1672
|
async function defineConfig(options = {}, ...userConfigs) {
|
|
1639
1673
|
const {
|
|
1640
1674
|
componentExts = [],
|
|
1641
1675
|
gitignore: enableGitignore = true,
|
|
1642
|
-
isInEditor =
|
|
1676
|
+
isInEditor: isInEditor2 = isInEditor,
|
|
1643
1677
|
react: enableReact = false,
|
|
1644
1678
|
svelte: enableSvelte = false,
|
|
1645
|
-
|
|
1679
|
+
tailwindcss: enableTailwindCSS = hasTailwindCSS,
|
|
1680
|
+
typescript: enableTypeScript = hasTypeScript,
|
|
1646
1681
|
unocss: enableUnoCSS = false,
|
|
1647
1682
|
usePrettierrc = true,
|
|
1648
|
-
vue: enableVue =
|
|
1683
|
+
vue: enableVue = hasVue
|
|
1649
1684
|
} = options;
|
|
1650
1685
|
const configs = [];
|
|
1651
1686
|
if (enableGitignore) {
|
|
@@ -1667,7 +1702,7 @@ async function defineConfig(options = {}, ...userConfigs) {
|
|
|
1667
1702
|
configs.push(
|
|
1668
1703
|
ignores(),
|
|
1669
1704
|
javascript({
|
|
1670
|
-
isInEditor,
|
|
1705
|
+
isInEditor: isInEditor2,
|
|
1671
1706
|
overrides: getOverrides(options, "javascript")
|
|
1672
1707
|
}),
|
|
1673
1708
|
comments(),
|
|
@@ -1692,7 +1727,7 @@ async function defineConfig(options = {}, ...userConfigs) {
|
|
|
1692
1727
|
if (options.test ?? true) {
|
|
1693
1728
|
configs.push(
|
|
1694
1729
|
test({
|
|
1695
|
-
isInEditor,
|
|
1730
|
+
isInEditor: isInEditor2,
|
|
1696
1731
|
overrides: getOverrides(options, "test")
|
|
1697
1732
|
})
|
|
1698
1733
|
);
|
|
@@ -1730,6 +1765,14 @@ async function defineConfig(options = {}, ...userConfigs) {
|
|
|
1730
1765
|
})
|
|
1731
1766
|
);
|
|
1732
1767
|
}
|
|
1768
|
+
if (enableTailwindCSS) {
|
|
1769
|
+
configs.push(
|
|
1770
|
+
tailwindcss({
|
|
1771
|
+
...resolveSubOptions(options, "tailwindcss"),
|
|
1772
|
+
overrides: getOverrides(options, "tailwindcss")
|
|
1773
|
+
})
|
|
1774
|
+
);
|
|
1775
|
+
}
|
|
1733
1776
|
if (options.jsonc ?? true) {
|
|
1734
1777
|
configs.push(
|
|
1735
1778
|
jsonc({
|
|
@@ -1747,7 +1790,7 @@ async function defineConfig(options = {}, ...userConfigs) {
|
|
|
1747
1790
|
}
|
|
1748
1791
|
if (usePrettierrc) {
|
|
1749
1792
|
const prettierConfig = await loadPrettierConfig(
|
|
1750
|
-
options.cwd ??
|
|
1793
|
+
options.cwd ?? process4.cwd()
|
|
1751
1794
|
);
|
|
1752
1795
|
Object.assign(prettierRules2, prettierConfig);
|
|
1753
1796
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coderwyd/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.1
|
|
5
|
-
"packageManager": "pnpm@8.15.
|
|
4
|
+
"version": "2.2.1",
|
|
5
|
+
"packageManager": "pnpm@8.15.4",
|
|
6
6
|
"description": "Donny's ESLint config",
|
|
7
7
|
"author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
|
|
8
8
|
"license": "MIT",
|
|
@@ -68,27 +68,28 @@
|
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@antfu/eslint-define-config": "1.23.0-2",
|
|
70
70
|
"@antfu/install-pkg": "^0.3.1",
|
|
71
|
-
"@eslint-types/jsdoc": "48.0
|
|
72
|
-
"@eslint-types/typescript-eslint": "^
|
|
71
|
+
"@eslint-types/jsdoc": "48.2.0",
|
|
72
|
+
"@eslint-types/typescript-eslint": "^7.0.2",
|
|
73
73
|
"@eslint-types/unicorn": "^51.0.1",
|
|
74
74
|
"@toml-tools/parser": "^1.0.0",
|
|
75
|
-
"@typescript-eslint/eslint-plugin": "^7.0
|
|
76
|
-
"@typescript-eslint/parser": "^7.0
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
76
|
+
"@typescript-eslint/parser": "^7.1.0",
|
|
77
77
|
"eslint-config-flat-gitignore": "^0.1.3",
|
|
78
78
|
"eslint-config-prettier": "^9.1.0",
|
|
79
79
|
"eslint-plugin-antfu": "^2.1.2",
|
|
80
80
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
81
81
|
"eslint-plugin-i": "^2.29.1",
|
|
82
|
-
"eslint-plugin-jsdoc": "^48.
|
|
82
|
+
"eslint-plugin-jsdoc": "^48.2.0",
|
|
83
83
|
"eslint-plugin-jsonc": "^2.13.0",
|
|
84
84
|
"eslint-plugin-n": "^16.6.2",
|
|
85
85
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
86
86
|
"eslint-plugin-perfectionist": "^2.5.0",
|
|
87
87
|
"eslint-plugin-prettier": "^5.1.3",
|
|
88
|
+
"eslint-plugin-tailwindcss": "^3.14.3",
|
|
88
89
|
"eslint-plugin-unicorn": "^51.0.1",
|
|
89
|
-
"eslint-plugin-unused-imports": "^3.
|
|
90
|
+
"eslint-plugin-unused-imports": "^3.1.0",
|
|
90
91
|
"eslint-plugin-vitest": "^0.3.22",
|
|
91
|
-
"eslint-plugin-vue": "^9.
|
|
92
|
+
"eslint-plugin-vue": "^9.22.0",
|
|
92
93
|
"globals": "^14.0.0",
|
|
93
94
|
"jsonc-eslint-parser": "^2.4.0",
|
|
94
95
|
"local-pkg": "^0.5.0",
|
|
@@ -102,14 +103,14 @@
|
|
|
102
103
|
},
|
|
103
104
|
"devDependencies": {
|
|
104
105
|
"@antfu/ni": "^0.21.12",
|
|
105
|
-
"@types/eslint": "^8.56.
|
|
106
|
+
"@types/eslint": "^8.56.5",
|
|
106
107
|
"@types/fs-extra": "^11.0.4",
|
|
107
|
-
"@types/node": "^20.11.
|
|
108
|
+
"@types/node": "^20.11.24",
|
|
108
109
|
"@types/prompts": "^2.4.9",
|
|
109
110
|
"@types/yargs": "^17.0.32",
|
|
110
111
|
"@unocss/eslint-plugin": "^0.58.5",
|
|
111
112
|
"bumpp": "^9.3.0",
|
|
112
|
-
"eslint": "^8.
|
|
113
|
+
"eslint": "^8.57.0",
|
|
113
114
|
"eslint-flat-config-viewer": "^0.1.11",
|
|
114
115
|
"eslint-plugin-react": "^7.33.2",
|
|
115
116
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
@@ -121,7 +122,7 @@
|
|
|
121
122
|
"fs-extra": "^11.2.0",
|
|
122
123
|
"lint-staged": "^15.2.2",
|
|
123
124
|
"rimraf": "^5.0.5",
|
|
124
|
-
"simple-git-hooks": "^2.
|
|
125
|
+
"simple-git-hooks": "^2.10.0",
|
|
125
126
|
"svelte-eslint-parser": "^0.33.1",
|
|
126
127
|
"tsup": "^8.0.2",
|
|
127
128
|
"typescript": "^5.3.3"
|