@liwo/eslint-config 0.0.4 → 0.0.5
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.d.ts +12 -11
- package/dist/index.js +2 -2
- package/package.json +43 -59
package/dist/index.d.ts
CHANGED
|
@@ -1081,7 +1081,7 @@ interface RuleOptions {
|
|
|
1081
1081
|
* Disallow data rows in a GitHub Flavored Markdown table from having more cells than the header row
|
|
1082
1082
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/table-column-count.md
|
|
1083
1083
|
*/
|
|
1084
|
-
'markdown/table-column-count'?: Linter.RuleEntry<
|
|
1084
|
+
'markdown/table-column-count'?: Linter.RuleEntry<MarkdownTableColumnCount>;
|
|
1085
1085
|
/**
|
|
1086
1086
|
* Enforce a maximum number of classes per file
|
|
1087
1087
|
* @see https://eslint.org/docs/latest/rules/max-classes-per-file
|
|
@@ -7226,6 +7226,7 @@ type AccessorPairs = [] | [{
|
|
|
7226
7226
|
getWithoutSet?: boolean;
|
|
7227
7227
|
setWithoutGet?: boolean;
|
|
7228
7228
|
enforceForClassMembers?: boolean;
|
|
7229
|
+
enforceForTSTypes?: boolean;
|
|
7229
7230
|
}];
|
|
7230
7231
|
// ----- antfu/consistent-chaining -----
|
|
7231
7232
|
type AntfuConsistentChaining = [] | [{
|
|
@@ -7474,7 +7475,9 @@ type GetterReturn = [] | [{
|
|
|
7474
7475
|
allowImplicit?: boolean;
|
|
7475
7476
|
}];
|
|
7476
7477
|
// ----- grouped-accessor-pairs -----
|
|
7477
|
-
type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")]
|
|
7478
|
+
type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")] | [("anyOrder" | "getBeforeSet" | "setBeforeGet"), {
|
|
7479
|
+
enforceForTSTypes?: boolean;
|
|
7480
|
+
}];
|
|
7478
7481
|
// ----- handle-callback-err -----
|
|
7479
7482
|
type HandleCallbackErr = [] | [string];
|
|
7480
7483
|
// ----- id-blacklist -----
|
|
@@ -8725,6 +8728,10 @@ type MarkdownNoUnusedDefinitions = [] | [{
|
|
|
8725
8728
|
allowDefinitions?: string[];
|
|
8726
8729
|
allowFootnoteDefinitions?: string[];
|
|
8727
8730
|
}];
|
|
8731
|
+
// ----- markdown/table-column-count -----
|
|
8732
|
+
type MarkdownTableColumnCount = [] | [{
|
|
8733
|
+
checkMissingCells?: boolean;
|
|
8734
|
+
}];
|
|
8728
8735
|
// ----- max-classes-per-file -----
|
|
8729
8736
|
type MaxClassesPerFile = [] | [(number | {
|
|
8730
8737
|
ignoreExpressions?: boolean;
|
|
@@ -9202,6 +9209,7 @@ type NoUnusedVars = [] | [(("all" | "local") | {
|
|
|
9202
9209
|
caughtErrorsIgnorePattern?: string;
|
|
9203
9210
|
destructuredArrayIgnorePattern?: string;
|
|
9204
9211
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
9212
|
+
ignoreUsingDeclarations?: boolean;
|
|
9205
9213
|
reportUsedIgnorePattern?: boolean;
|
|
9206
9214
|
})];
|
|
9207
9215
|
// ----- no-use-before-define -----
|
|
@@ -13815,7 +13823,6 @@ type TsPreferDestructuring = [] | [({
|
|
|
13815
13823
|
}), {
|
|
13816
13824
|
enforceForDeclarationWithTypeAnnotation?: boolean;
|
|
13817
13825
|
enforceForRenamedProperties?: boolean;
|
|
13818
|
-
[k: string]: unknown | undefined;
|
|
13819
13826
|
}];
|
|
13820
13827
|
// ----- ts/prefer-literal-enum-member -----
|
|
13821
13828
|
type TsPreferLiteralEnumMember = [] | [{
|
|
@@ -13833,7 +13840,6 @@ type TsPreferNullishCoalescing = [] | [{
|
|
|
13833
13840
|
boolean?: boolean;
|
|
13834
13841
|
number?: boolean;
|
|
13835
13842
|
string?: boolean;
|
|
13836
|
-
[k: string]: unknown | undefined;
|
|
13837
13843
|
} | true);
|
|
13838
13844
|
ignoreTernaryTests?: boolean;
|
|
13839
13845
|
}];
|
|
@@ -16048,12 +16054,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
|
16048
16054
|
/**
|
|
16049
16055
|
* Enable react rules.
|
|
16050
16056
|
*
|
|
16051
|
-
*
|
|
16052
|
-
* - `@eslint-react/eslint-plugin`
|
|
16053
|
-
* - `eslint-plugin-react-hooks`
|
|
16054
|
-
* - `eslint-plugin-react-refresh`
|
|
16055
|
-
*
|
|
16056
|
-
* @default false
|
|
16057
|
+
* @default auto-detect based on the dependencies
|
|
16057
16058
|
*/
|
|
16058
16059
|
react?: boolean | OptionsOverrides;
|
|
16059
16060
|
/**
|
|
@@ -16084,7 +16085,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
|
16084
16085
|
*
|
|
16085
16086
|
* When set to `true`, it will enable all formatters.
|
|
16086
16087
|
*
|
|
16087
|
-
* @default
|
|
16088
|
+
* @default true
|
|
16088
16089
|
*/
|
|
16089
16090
|
formatters?: boolean | OptionsFormatters;
|
|
16090
16091
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1978,7 +1978,7 @@ const defaultPluginRenaming = {
|
|
|
1978
1978
|
* The merged ESLint configurations.
|
|
1979
1979
|
*/
|
|
1980
1980
|
function eslintConfig(options = {}, ...userConfigs) {
|
|
1981
|
-
const { autoRenamePlugins = true, componentExts = [], gitignore: enableGitignore = true, imports: enableImports = true, jsx: enableJsx = true, pnpm: enableCatalogs = false, react: enableReact =
|
|
1981
|
+
const { autoRenamePlugins = true, componentExts = [], gitignore: enableGitignore = true, imports: enableImports = true, jsx: enableJsx = true, pnpm: enableCatalogs = false, react: enableReact = isPackageExists("react"), regexp: enableRegexp = true, typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, unocss: enableUnoCSS = false, vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
|
|
1982
1982
|
let isInEditor = options.isInEditor;
|
|
1983
1983
|
if (isInEditor == null) {
|
|
1984
1984
|
isInEditor = isInEditorEnv();
|
|
@@ -2056,7 +2056,7 @@ function eslintConfig(options = {}, ...userConfigs) {
|
|
|
2056
2056
|
componentExts,
|
|
2057
2057
|
overrides: getOverrides(options, "markdown")
|
|
2058
2058
|
}));
|
|
2059
|
-
if (options.formatters) configs$1.push(formatters(options.formatters, typeof stylisticOptions === "boolean" ? {} : stylisticOptions));
|
|
2059
|
+
if (options.formatters || options.formatters === void 0) configs$1.push(formatters(options.formatters, typeof stylisticOptions === "boolean" ? {} : stylisticOptions));
|
|
2060
2060
|
configs$1.push(disables());
|
|
2061
2061
|
if ("files" in options) throw new Error("[@liwo/eslint-config] The first argument should not contain the \"files\" property as the options are supposed to be global. Place it in the second or later config instead.");
|
|
2062
2062
|
const fusedConfig = flatConfigProps.reduce((acc, key) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liwo/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"description": "ESLint config by Liwo",
|
|
6
6
|
"author": "Aoang <aoang@x2oe.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -25,35 +25,18 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@eslint-react/eslint-plugin": "^1.52.3",
|
|
29
28
|
"@prettier/plugin-xml": "^3.4.2",
|
|
30
29
|
"@unocss/eslint-plugin": "^66.3.3",
|
|
31
|
-
"eslint": "^9.31.0",
|
|
32
|
-
"eslint-plugin-format": "^1.0.1",
|
|
33
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
34
|
-
"eslint-plugin-react-refresh": "^0.4.20",
|
|
35
30
|
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
36
31
|
"prettier-plugin-slidev": "^1.0.5"
|
|
37
32
|
},
|
|
38
33
|
"peerDependenciesMeta": {
|
|
39
|
-
"@eslint-react/eslint-plugin": {
|
|
40
|
-
"optional": true
|
|
41
|
-
},
|
|
42
34
|
"@prettier/plugin-xml": {
|
|
43
35
|
"optional": true
|
|
44
36
|
},
|
|
45
37
|
"@unocss/eslint-plugin": {
|
|
46
38
|
"optional": true
|
|
47
39
|
},
|
|
48
|
-
"eslint-plugin-format": {
|
|
49
|
-
"optional": true
|
|
50
|
-
},
|
|
51
|
-
"eslint-plugin-react-hooks": {
|
|
52
|
-
"optional": true
|
|
53
|
-
},
|
|
54
|
-
"eslint-plugin-react-refresh": {
|
|
55
|
-
"optional": true
|
|
56
|
-
},
|
|
57
40
|
"eslint-plugin-vuejs-accessibility": {
|
|
58
41
|
"optional": true
|
|
59
42
|
},
|
|
@@ -62,57 +45,58 @@
|
|
|
62
45
|
}
|
|
63
46
|
},
|
|
64
47
|
"dependencies": {
|
|
65
|
-
"@antfu/install-pkg": "
|
|
66
|
-
"@clack/prompts": "
|
|
67
|
-
"@eslint-community/eslint-plugin-eslint-comments": "
|
|
68
|
-
"@eslint/
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"@typescript-eslint/
|
|
72
|
-
"@
|
|
73
|
-
"eslint-
|
|
74
|
-
"eslint
|
|
75
|
-
"eslint-
|
|
76
|
-
"eslint-
|
|
77
|
-
"eslint-
|
|
78
|
-
"eslint-plugin-
|
|
79
|
-
"eslint-plugin-
|
|
80
|
-
"eslint-plugin-
|
|
81
|
-
"eslint-plugin-
|
|
82
|
-
"eslint-plugin-
|
|
83
|
-
"eslint-plugin-
|
|
84
|
-
"eslint-plugin-
|
|
85
|
-
"eslint-plugin-
|
|
86
|
-
"eslint-plugin-
|
|
87
|
-
"eslint-plugin-
|
|
88
|
-
"eslint-plugin-
|
|
89
|
-
"eslint-plugin-
|
|
90
|
-
"eslint-plugin-
|
|
91
|
-
"eslint-
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
48
|
+
"@antfu/install-pkg": "1.1.0",
|
|
49
|
+
"@clack/prompts": "0.11.0",
|
|
50
|
+
"@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
|
|
51
|
+
"@eslint-react/eslint-plugin": "1.52.3",
|
|
52
|
+
"@eslint/markdown": "7.1.0",
|
|
53
|
+
"@stylistic/eslint-plugin": "5.2.2",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "8.38.0",
|
|
55
|
+
"@typescript-eslint/parser": "8.38.0",
|
|
56
|
+
"@vitest/eslint-plugin": "1.3.4",
|
|
57
|
+
"eslint": "9.32.0",
|
|
58
|
+
"eslint-config-flat-gitignore": "2.1.0",
|
|
59
|
+
"eslint-flat-config-utils": "2.1.1",
|
|
60
|
+
"eslint-merge-processors": "2.0.0",
|
|
61
|
+
"eslint-plugin-antfu": "3.1.1",
|
|
62
|
+
"eslint-plugin-command": "3.3.1",
|
|
63
|
+
"eslint-plugin-format": "1.0.1",
|
|
64
|
+
"eslint-plugin-import-lite": "0.3.0",
|
|
65
|
+
"eslint-plugin-jsdoc": "52.0.0",
|
|
66
|
+
"eslint-plugin-jsonc": "2.20.1",
|
|
67
|
+
"eslint-plugin-n": "17.21.3",
|
|
68
|
+
"eslint-plugin-no-only-tests": "3.3.0",
|
|
69
|
+
"eslint-plugin-perfectionist": "4.15.0",
|
|
70
|
+
"eslint-plugin-pnpm": "1.1.0",
|
|
71
|
+
"eslint-plugin-react-hooks": "5.2.0",
|
|
72
|
+
"eslint-plugin-react-refresh": "0.4.20",
|
|
73
|
+
"eslint-plugin-regexp": "2.9.0",
|
|
74
|
+
"eslint-plugin-toml": "0.12.0",
|
|
75
|
+
"eslint-plugin-unicorn": "60.0.0",
|
|
76
|
+
"eslint-plugin-unused-imports": "4.1.4",
|
|
77
|
+
"eslint-plugin-vue": "10.3.0",
|
|
78
|
+
"eslint-plugin-yml": "1.18.0",
|
|
79
|
+
"eslint-processor-vue-blocks": "2.0.0",
|
|
80
|
+
"globals": "16.3.0",
|
|
81
|
+
"jsonc-eslint-parser": "2.4.0",
|
|
82
|
+
"local-pkg": "1.1.1",
|
|
83
|
+
"parse-gitignore": "2.0.0",
|
|
84
|
+
"toml-eslint-parser": "0.10.0",
|
|
85
|
+
"vue-eslint-parser": "10.2.0",
|
|
86
|
+
"yaml-eslint-parser": "1.3.0"
|
|
99
87
|
},
|
|
100
88
|
"devDependencies": {
|
|
101
|
-
"@eslint-react/eslint-plugin": "^1.52.3",
|
|
102
89
|
"@eslint/config-inspector": "^1.1.0",
|
|
103
90
|
"@prettier/plugin-xml": "^3.4.2",
|
|
104
91
|
"@types/node": "24.1.0",
|
|
105
92
|
"@unocss/eslint-plugin": "^66.3.3",
|
|
106
|
-
"eslint": "9.31.0",
|
|
107
|
-
"eslint-plugin-format": "1.0.1",
|
|
108
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
109
|
-
"eslint-plugin-react-refresh": "^0.4.20",
|
|
110
93
|
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
111
94
|
"eslint-typegen": "^2.2.1",
|
|
112
95
|
"execa": "^9.6.0",
|
|
113
96
|
"lint-staged": "^16.1.2",
|
|
114
97
|
"pnpm-workspace-yaml": "^1.0.0",
|
|
115
98
|
"prettier-plugin-slidev": "^1.0.5",
|
|
99
|
+
"react": "^19.1.0",
|
|
116
100
|
"simple-git-hooks": "^2.13.0",
|
|
117
101
|
"tinyglobby": "^0.2.14",
|
|
118
102
|
"tsdown": "^0.13.0",
|
|
@@ -120,7 +104,7 @@
|
|
|
120
104
|
"typescript": "^5.8.3",
|
|
121
105
|
"vitest": "^3.2.4",
|
|
122
106
|
"vue": "^3.5.17",
|
|
123
|
-
"@liwo/eslint-config": "0.0.
|
|
107
|
+
"@liwo/eslint-config": "0.0.5"
|
|
124
108
|
},
|
|
125
109
|
"simple-git-hooks": {
|
|
126
110
|
"pre-commit": "npx lint-staged"
|
|
@@ -135,7 +119,7 @@
|
|
|
135
119
|
"build": "pnpm run gen && tsdown --clean --dts",
|
|
136
120
|
"stub": "tsdown",
|
|
137
121
|
"dev": "npx @eslint/config-inspector --config eslint.config.ts",
|
|
138
|
-
"build:inspector": "pnpm build && npx @eslint/config-inspector build",
|
|
122
|
+
"build:inspector": "pnpm build && npx @eslint/config-inspector build && tsx scripts/fixed-netlify.ts",
|
|
139
123
|
"watch": "tsdown --watch",
|
|
140
124
|
"lint": "eslint",
|
|
141
125
|
"gen": "tsx scripts/typegen.ts",
|