@kazupon/eslint-config 0.22.0 → 0.24.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/README.md +2 -2
- package/dist/index.d.ts +37 -5
- package/dist/index.js +5 -5
- package/package.json +24 -24
package/README.md
CHANGED
|
@@ -121,7 +121,7 @@ Add the following settings to your `.vscode/settings.json`:
|
|
|
121
121
|
The following built-in preset configurations are supported:
|
|
122
122
|
|
|
123
123
|
| Configuration | Powered by eslint plugin or package | Need to install eslint plugin or package? |
|
|
124
|
-
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
124
|
+
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
125
125
|
| `javascript` | [`@eslint/js`](https://www.npmjs.com/package/@eslint/js) | no (built-in) |
|
|
126
126
|
| `comments` | [`@eslint-community/eslint-plugin-eslint-comments`](https://www.npmjs.com/package/@eslint-community/eslint-plugin-eslint-comments) | no (built-in) |
|
|
127
127
|
| `typescript` | [`typescript-eslint`](https://www.npmjs.com/package/typescript-eslint) | yes |
|
|
@@ -139,7 +139,7 @@ The following built-in preset configurations are supported:
|
|
|
139
139
|
| `yml` | [`eslint-plugin-yml`](https://www.npmjs.com/package/eslint-plugin-yml) | yes |
|
|
140
140
|
| `toml` | [`eslint-plugin-toml`](https://www.npmjs.com/package/eslint-plugin-toml) | yes |
|
|
141
141
|
| `markdown` | [`@eslint/markdown`](https://www.npmjs.com/package/@eslint/markdown) | yes |
|
|
142
|
-
| `css` | [`@eslint/css`](https://www.npmjs.com/package/@eslint/css) | yes |
|
|
142
|
+
| `css` | [`@eslint/css`](https://www.npmjs.com/package/@eslint/css) | yes |
|
|
143
143
|
|
|
144
144
|
You can use `import` syntax:
|
|
145
145
|
|
package/dist/index.d.ts
CHANGED
|
@@ -102,6 +102,11 @@ interface CssRules {
|
|
|
102
102
|
* @see https://github.com/eslint/css/blob/main/docs/rules/no-invalid-properties.md
|
|
103
103
|
*/
|
|
104
104
|
'css/no-invalid-properties'?: Linter.RuleEntry<[]>;
|
|
105
|
+
/**
|
|
106
|
+
* Enforce the use of logical properties
|
|
107
|
+
* @see https://github.com/eslint/css/blob/main/docs/rules/prefer-logical-properties.md
|
|
108
|
+
*/
|
|
109
|
+
'css/prefer-logical-properties'?: Linter.RuleEntry<CssPreferLogicalProperties>;
|
|
105
110
|
/**
|
|
106
111
|
* Enforce the use of baseline features
|
|
107
112
|
*/
|
|
@@ -112,9 +117,15 @@ interface CssRules {
|
|
|
112
117
|
*/
|
|
113
118
|
'css/use-layers'?: Linter.RuleEntry<CssUseLayers>;
|
|
114
119
|
}
|
|
120
|
+
type CssPreferLogicalProperties = [] | [
|
|
121
|
+
{
|
|
122
|
+
allowProperties?: string[];
|
|
123
|
+
allowUnits?: string[];
|
|
124
|
+
}
|
|
125
|
+
];
|
|
115
126
|
type CssRequireBaseline = [] | [
|
|
116
127
|
{
|
|
117
|
-
available?: ("widely" | "newly");
|
|
128
|
+
available?: (("widely" | "newly") | number);
|
|
118
129
|
}
|
|
119
130
|
];
|
|
120
131
|
type CssUseLayers = [] | [
|
|
@@ -8447,6 +8458,7 @@ type TypescriptEslintExplicitModuleBoundaryTypes = [] | [
|
|
|
8447
8458
|
allowDirectConstAssertionInArrowFunctions?: boolean;
|
|
8448
8459
|
allowedNames?: string[];
|
|
8449
8460
|
allowHigherOrderFunctions?: boolean;
|
|
8461
|
+
allowOverloadFunctions?: boolean;
|
|
8450
8462
|
allowTypedFunctionExpressions?: boolean;
|
|
8451
8463
|
}
|
|
8452
8464
|
];
|
|
@@ -9347,6 +9359,7 @@ type TypescriptEslintUnboundMethod = [] | [
|
|
|
9347
9359
|
type TypescriptEslintUnifiedSignatures = [] | [
|
|
9348
9360
|
{
|
|
9349
9361
|
ignoreDifferentlyNamedParameters?: boolean;
|
|
9362
|
+
ignoreOverloadsWithDifferentJSDoc?: boolean;
|
|
9350
9363
|
}
|
|
9351
9364
|
];
|
|
9352
9365
|
|
|
@@ -10908,7 +10921,7 @@ interface VueRules {
|
|
|
10908
10921
|
*/
|
|
10909
10922
|
'vue/html-closing-bracket-spacing'?: Linter.RuleEntry<VueHtmlClosingBracketSpacing>;
|
|
10910
10923
|
/**
|
|
10911
|
-
* enforce unified line
|
|
10924
|
+
* enforce unified line break in HTML comments
|
|
10912
10925
|
* @see https://eslint.vuejs.org/rules/html-comment-content-newline.html
|
|
10913
10926
|
*/
|
|
10914
10927
|
'vue/html-comment-content-newline'?: Linter.RuleEntry<VueHtmlCommentContentNewline>;
|
|
@@ -11217,6 +11230,11 @@ interface VueRules {
|
|
|
11217
11230
|
* @see https://eslint.vuejs.org/rules/no-extra-parens.html
|
|
11218
11231
|
*/
|
|
11219
11232
|
'vue/no-extra-parens'?: Linter.RuleEntry<VueNoExtraParens>;
|
|
11233
|
+
/**
|
|
11234
|
+
* Disallow shorthand type conversions in `<template>`
|
|
11235
|
+
* @see https://eslint.vuejs.org/rules/no-implicit-coercion.html
|
|
11236
|
+
*/
|
|
11237
|
+
'vue/no-implicit-coercion'?: Linter.RuleEntry<VueNoImplicitCoercion>;
|
|
11220
11238
|
/**
|
|
11221
11239
|
* require valid keys in model option
|
|
11222
11240
|
* @see https://eslint.vuejs.org/rules/no-invalid-model-keys.html
|
|
@@ -11249,12 +11267,12 @@ interface VueRules {
|
|
|
11249
11267
|
*/
|
|
11250
11268
|
'vue/no-multi-spaces'?: Linter.RuleEntry<VueNoMultiSpaces>;
|
|
11251
11269
|
/**
|
|
11252
|
-
* disallow
|
|
11270
|
+
* disallow passing multiple objects in an array to class
|
|
11253
11271
|
* @see https://eslint.vuejs.org/rules/no-multiple-objects-in-class.html
|
|
11254
11272
|
*/
|
|
11255
11273
|
'vue/no-multiple-objects-in-class'?: Linter.RuleEntry<[]>;
|
|
11256
11274
|
/**
|
|
11257
|
-
* disallow
|
|
11275
|
+
* disallow passing multiple arguments to scoped slots
|
|
11258
11276
|
* @see https://eslint.vuejs.org/rules/no-multiple-slot-args.html
|
|
11259
11277
|
*/
|
|
11260
11278
|
'vue/no-multiple-slot-args'?: Linter.RuleEntry<[]>;
|
|
@@ -12921,6 +12939,15 @@ type VueNoExtraParens = ([] | ["functions"] | [] | ["all"] | [
|
|
|
12921
12939
|
allowParensAfterCommentPattern?: string;
|
|
12922
12940
|
}
|
|
12923
12941
|
]);
|
|
12942
|
+
type VueNoImplicitCoercion = [] | [
|
|
12943
|
+
{
|
|
12944
|
+
boolean?: boolean;
|
|
12945
|
+
number?: boolean;
|
|
12946
|
+
string?: boolean;
|
|
12947
|
+
disallowTemplateShorthand?: boolean;
|
|
12948
|
+
allow?: ("~" | "!!" | "+" | "- -" | "-" | "*")[];
|
|
12949
|
+
}
|
|
12950
|
+
];
|
|
12924
12951
|
type VueNoIrregularWhitespace = [] | [
|
|
12925
12952
|
{
|
|
12926
12953
|
skipComments?: boolean;
|
|
@@ -13233,7 +13260,12 @@ type VuePaddingLinesInComponentDefinition = [] | [
|
|
|
13233
13260
|
})
|
|
13234
13261
|
];
|
|
13235
13262
|
type VuePreferTrueAttributeShorthand = [] | [("always" | "never")];
|
|
13236
|
-
type VuePropNameCasing = [] | [("camelCase" | "snake_case")]
|
|
13263
|
+
type VuePropNameCasing = [] | [("camelCase" | "snake_case")] | [
|
|
13264
|
+
("camelCase" | "snake_case"),
|
|
13265
|
+
{
|
|
13266
|
+
ignoreProps?: string[];
|
|
13267
|
+
}
|
|
13268
|
+
];
|
|
13237
13269
|
type VueQuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [
|
|
13238
13270
|
("always" | "as-needed" | "consistent" | "consistent-as-needed"),
|
|
13239
13271
|
{
|
package/dist/index.js
CHANGED
|
@@ -387,14 +387,13 @@ async function react(options = {}) {
|
|
|
387
387
|
settings,
|
|
388
388
|
...react$1.configs.flat.recommended
|
|
389
389
|
}, {
|
|
390
|
-
name: "react-hooks/flat",
|
|
391
390
|
files: getGlobSourceFiles(useTypeScript),
|
|
392
|
-
|
|
391
|
+
...reactHooks.configs["recommended-latest"]
|
|
393
392
|
}];
|
|
394
393
|
if (enableRefresh) configs.push({
|
|
395
394
|
name: "react-refresh/flat",
|
|
396
395
|
files: getGlobSourceFiles(useTypeScript),
|
|
397
|
-
|
|
396
|
+
...reactRefresh?.configs.recommended
|
|
398
397
|
});
|
|
399
398
|
return [...configs, customConfig];
|
|
400
399
|
}
|
|
@@ -464,11 +463,12 @@ async function toml(options = {}) {
|
|
|
464
463
|
async function typescript(options = {}) {
|
|
465
464
|
const { rules: overrideRules = {}, extraFileExtensions = [], parserOptions = { project: true } } = options;
|
|
466
465
|
const ts = await loadPlugin("typescript-eslint");
|
|
467
|
-
const
|
|
466
|
+
const baseFiles = [
|
|
468
467
|
GLOB_TS,
|
|
469
468
|
GLOB_TSX,
|
|
470
469
|
...extraFileExtensions.map((ext) => `**/*${ext}`)
|
|
471
470
|
];
|
|
471
|
+
const files = [...options.files ?? [], ...baseFiles];
|
|
472
472
|
return [
|
|
473
473
|
...ts.configs.recommendedTypeChecked,
|
|
474
474
|
{
|
|
@@ -537,7 +537,7 @@ async function vitest(options = {}) {
|
|
|
537
537
|
files: GLOB_TESTS,
|
|
538
538
|
...vitest$1.configs["recommended"]
|
|
539
539
|
};
|
|
540
|
-
if (base.name ==
|
|
540
|
+
if (base.name == void 0) base.name = "@vitest/eslint-plugin";
|
|
541
541
|
if (typeTesting) {
|
|
542
542
|
base.files = [...base.files, ...GLOB_TESTS_TYPE];
|
|
543
543
|
base.settings = { vitest: { typecheck: true } };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kazupon/eslint-config",
|
|
3
3
|
"description": "ESLint config for @kazupon",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.24.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "kawakazu80@gmail.com",
|
|
7
7
|
"name": "kazuya kawaguchi"
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
53
|
-
"@eslint/js": "^9.
|
|
54
|
-
"@kazupon/jts-utils": "^0.
|
|
53
|
+
"@eslint/js": "^9.22.0",
|
|
54
|
+
"@kazupon/jts-utils": "^0.6.0",
|
|
55
55
|
"eslint-flat-config-utils": "^2.0.1",
|
|
56
56
|
"globals": "^16.0.0"
|
|
57
57
|
},
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"eslint-plugin-jsonc": ">=2.16.0",
|
|
68
68
|
"eslint-plugin-promise": ">=6.4.0",
|
|
69
69
|
"eslint-plugin-react": ">=7.35.0",
|
|
70
|
-
"eslint-plugin-react-hooks": ">=
|
|
71
|
-
"eslint-plugin-react-refresh": ">=0.4.
|
|
70
|
+
"eslint-plugin-react-hooks": ">=5.2.0",
|
|
71
|
+
"eslint-plugin-react-refresh": ">=0.4.19",
|
|
72
72
|
"eslint-plugin-regexp": ">=2.6.0",
|
|
73
73
|
"eslint-plugin-svelte": ">=2.43.0",
|
|
74
74
|
"eslint-plugin-toml": ">=0.11.0",
|
|
@@ -157,44 +157,44 @@
|
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
159
|
"devDependencies": {
|
|
160
|
-
"@eslint/css": "^0.
|
|
161
|
-
"@eslint/markdown": "^6.
|
|
160
|
+
"@eslint/css": "^0.5.0",
|
|
161
|
+
"@eslint/markdown": "^6.3.0",
|
|
162
162
|
"@kazupon/prettier-config": "^0.1.1",
|
|
163
163
|
"@types/eslint": "^9.6.1",
|
|
164
|
-
"@types/node": "^22.13.
|
|
165
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
166
|
-
"bumpp": "^10.0
|
|
167
|
-
"eslint": "^9.
|
|
168
|
-
"eslint-config-prettier": "^10.
|
|
169
|
-
"eslint-import-resolver-typescript": "^3.
|
|
164
|
+
"@types/node": "^22.13.11",
|
|
165
|
+
"@vitest/eslint-plugin": "^1.1.38",
|
|
166
|
+
"bumpp": "^10.1.0",
|
|
167
|
+
"eslint": "^9.22.0",
|
|
168
|
+
"eslint-config-prettier": "^10.1.1",
|
|
169
|
+
"eslint-import-resolver-typescript": "^3.9.1",
|
|
170
170
|
"eslint-plugin-import": "^2.31.0",
|
|
171
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
171
|
+
"eslint-plugin-jsdoc": "^50.6.8",
|
|
172
172
|
"eslint-plugin-jsonc": "^2.19.1",
|
|
173
173
|
"eslint-plugin-promise": "^7.2.1",
|
|
174
174
|
"eslint-plugin-react": "^7.37.4",
|
|
175
|
-
"eslint-plugin-react-hooks": "^5.
|
|
175
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
176
176
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
177
177
|
"eslint-plugin-regexp": "^2.7.0",
|
|
178
178
|
"eslint-plugin-svelte": "^2.46.1",
|
|
179
179
|
"eslint-plugin-toml": "^0.12.0",
|
|
180
180
|
"eslint-plugin-unicorn": "^57.0.0",
|
|
181
181
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
182
|
-
"eslint-plugin-vue": "^9.
|
|
182
|
+
"eslint-plugin-vue": "^9.33.0",
|
|
183
183
|
"eslint-plugin-vue-composable": "^1.0.0",
|
|
184
184
|
"eslint-plugin-vue-scoped-css": "^2.9.0",
|
|
185
185
|
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
186
186
|
"eslint-plugin-yml": "^1.17.0",
|
|
187
|
-
"eslint-typegen": "^2.
|
|
187
|
+
"eslint-typegen": "^2.1.0",
|
|
188
188
|
"gh-changelogen": "^0.2.8",
|
|
189
189
|
"jiti": "^2.4.2",
|
|
190
|
-
"knip": "^5.
|
|
191
|
-
"lint-staged": "^15.
|
|
192
|
-
"prettier": "^3.5.
|
|
190
|
+
"knip": "^5.46.0",
|
|
191
|
+
"lint-staged": "^15.5.0",
|
|
192
|
+
"prettier": "^3.5.3",
|
|
193
193
|
"svelte": "^4.2.19",
|
|
194
|
-
"tsdown": "^0.6.
|
|
195
|
-
"typescript": "^5.
|
|
196
|
-
"typescript-eslint": "^8.
|
|
197
|
-
"vitest": "^3.0.
|
|
194
|
+
"tsdown": "^0.6.9",
|
|
195
|
+
"typescript": "^5.8.2",
|
|
196
|
+
"typescript-eslint": "^8.27.0",
|
|
197
|
+
"vitest": "^3.0.9"
|
|
198
198
|
},
|
|
199
199
|
"prettier": "@kazupon/prettier-config",
|
|
200
200
|
"lint-staged": {
|