@kazupon/eslint-config 0.15.0 → 0.16.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 +24 -22
- package/dist/configs/imports.d.cts +16 -0
- package/dist/configs/imports.d.ts +16 -0
- package/dist/configs/index.d.cts +1 -0
- package/dist/configs/index.d.ts +1 -0
- package/dist/configs/vue.d.cts +18 -3
- package/dist/configs/vue.d.ts +18 -3
- package/dist/index.cjs +75 -3
- package/dist/index.js +70 -4
- package/dist/types/gens/eslint.d.cts +2 -1
- package/dist/types/gens/eslint.d.ts +2 -1
- package/dist/types/gens/imports.d.cts +42 -0
- package/dist/types/gens/imports.d.ts +42 -0
- package/dist/types/gens/vue.d.cts +281 -0
- package/dist/types/gens/vue.d.ts +281 -0
- package/dist/types/index.d.cts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +21 -1
package/README.md
CHANGED
|
@@ -8,10 +8,11 @@ ESLint config for @kazupon
|
|
|
8
8
|
## 🌟 Features
|
|
9
9
|
|
|
10
10
|
- Flat configuration via [vite](https://vitejs.dev/config/) flavor `defineConfig`
|
|
11
|
-
- Support [built-in configurations](#built-in-configurations)
|
|
11
|
+
- Support [built-in preset configurations](#built-in-preset-configurations)
|
|
12
12
|
- `javascript`
|
|
13
13
|
- `comments`
|
|
14
14
|
- `typescript`
|
|
15
|
+
- `imports`
|
|
15
16
|
- `jsdoc`
|
|
16
17
|
- `regexp`
|
|
17
18
|
- `promise`
|
|
@@ -107,27 +108,28 @@ Add the following settings to your `.vscode/settings.json`:
|
|
|
107
108
|
}
|
|
108
109
|
```
|
|
109
110
|
|
|
110
|
-
## 🔨Built-in configurations
|
|
111
|
-
|
|
112
|
-
The following built-in configurations are supported:
|
|
113
|
-
|
|
114
|
-
| Configuration | Powered by eslint plugin or package
|
|
115
|
-
| ------------- |
|
|
116
|
-
| `javascript` | [`@eslint/js`](https://www.npmjs.com/package/@eslint/js)
|
|
117
|
-
| `comments` | [`@eslint-community/eslint-plugin-eslint-comments`](https://www.npmjs.com/package/@eslint-community/eslint-plugin-eslint-comments)
|
|
118
|
-
| `typescript` | [`typescript-eslint`](https://www.npmjs.com/package/typescript-eslint)
|
|
119
|
-
| `
|
|
120
|
-
| `
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
123
|
-
| `
|
|
124
|
-
| `
|
|
125
|
-
| `
|
|
126
|
-
| `
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
111
|
+
## 🔨Built-in preset configurations
|
|
112
|
+
|
|
113
|
+
The following built-in preset configurations are supported:
|
|
114
|
+
|
|
115
|
+
| Configuration | Powered by eslint plugin or package | Need to install eslint plugin or package? |
|
|
116
|
+
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
117
|
+
| `javascript` | [`@eslint/js`](https://www.npmjs.com/package/@eslint/js) | no (built-in) |
|
|
118
|
+
| `comments` | [`@eslint-community/eslint-plugin-eslint-comments`](https://www.npmjs.com/package/@eslint-community/eslint-plugin-eslint-comments) | no (built-in) |
|
|
119
|
+
| `typescript` | [`typescript-eslint`](https://www.npmjs.com/package/typescript-eslint) | yes |
|
|
120
|
+
| `imports` | [`eslint-plugin-unused-imports`](https://www.npmjs.com/package/eslint-plugin-unused-imports) | yes |
|
|
121
|
+
| `jsdoc` | [`eslint-plugin-jsdoc`](https://www.npmjs.com/package/eslint-plugin-jsdoc) | yes |
|
|
122
|
+
| `regexp` | [`eslint-plugin-regexp`](https://www.npmjs.com/package/eslint-plugin-regexp) | yes |
|
|
123
|
+
| `promise` | [`eslint-plugin-promise`](https://www.npmjs.com/package/eslint-plugin-promise) | yes |
|
|
124
|
+
| `unicorn` | [`eslint-plugin-unicorn`](https://www.npmjs.com/package/eslint-plugin-unicorn) | yes |
|
|
125
|
+
| `prettier` | [`eslint-config-prettier`](https://www.npmjs.com/package/eslint-config-prettier) | yes |
|
|
126
|
+
| `vue` | [`eslint-plugin-vue`](https://www.npmjs.com/package/eslint-plugin-vue), [`eslint-plugin-vue-composable`](https://www.npmjs.com/package/eslint-plugin-vue-composable), [`eslint-plugin-vue-scoped-css`](https://www.npmjs.com/package/eslint-plugin-vue-scoped-css), [`eslint-plugin-vuejs-accessibility`](https://www.npmjs.com/package/eslint-plugin-vuejs-accessibility)) | yes |
|
|
127
|
+
| `react` | [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react), [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks), [`eslint-plugin-react-refresh`](https://www.npmjs.com/package/eslint-plugin-react-refresh) | yes |
|
|
128
|
+
| `svelte` | [`eslint-plugin-svelte`](https://www.npmjs.com/package/eslint-plugin-svelte) | yes |
|
|
129
|
+
| `vitest` | [`@vitest/eslint-plugin`](https://www.npmjs.com/package/@vitest/eslint-plugin) | yes |
|
|
130
|
+
| `jsonc` | [`eslint-plugin-jsonc`](https://www.npmjs.com/package/eslint-plugin-jsonc) | yes |
|
|
131
|
+
| `yml` | [`eslint-plugin-yml`](https://www.npmjs.com/package/eslint-plugin-yml) | yes |
|
|
132
|
+
| `toml` | [`eslint-plugin-toml`](https://www.npmjs.com/package/eslint-plugin-toml) | yes |
|
|
131
133
|
|
|
132
134
|
You can use `import` syntax:
|
|
133
135
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Linter } from 'eslint';
|
|
2
|
+
import type { OverridesOptions, ImportsRules } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* imports configuration options
|
|
5
|
+
*/
|
|
6
|
+
export interface ImportsOptions {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* `eslint-plugin-unused-imports` and overrides configuration options
|
|
10
|
+
* @description **if you want to use this preset, you need to put after `javascirpt` and `typescript` presets**
|
|
11
|
+
* @param {ImportsOptions & OverridesOptions} options
|
|
12
|
+
* import configuration options
|
|
13
|
+
* @returns {Promise<Linter.Config[]>}
|
|
14
|
+
* eslint flat configurations with `eslint-plugin-unused-imports` and overrides
|
|
15
|
+
*/
|
|
16
|
+
export declare function imports(options?: ImportsRules & OverridesOptions<ImportsRules>): Promise<Linter.Config[]>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Linter } from 'eslint';
|
|
2
|
+
import type { OverridesOptions, ImportsRules } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* imports configuration options
|
|
5
|
+
*/
|
|
6
|
+
export interface ImportsOptions {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* `eslint-plugin-unused-imports` and overrides configuration options
|
|
10
|
+
* @description **if you want to use this preset, you need to put after `javascirpt` and `typescript` presets**
|
|
11
|
+
* @param {ImportsOptions & OverridesOptions} options
|
|
12
|
+
* import configuration options
|
|
13
|
+
* @returns {Promise<Linter.Config[]>}
|
|
14
|
+
* eslint flat configurations with `eslint-plugin-unused-imports` and overrides
|
|
15
|
+
*/
|
|
16
|
+
export declare function imports(options?: ImportsRules & OverridesOptions<ImportsRules>): Promise<Linter.Config[]>;
|
package/dist/configs/index.d.cts
CHANGED
package/dist/configs/index.d.ts
CHANGED
package/dist/configs/vue.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Linter } from 'eslint';
|
|
2
|
-
import type { TypeScriptOptions } from './typescript';
|
|
3
2
|
import type { OverridesOptions, VueRules } from '../types';
|
|
3
|
+
import type { TypeScriptOptions } from './typescript';
|
|
4
4
|
/**
|
|
5
5
|
* Vue configuration options
|
|
6
6
|
*/
|
|
@@ -10,12 +10,27 @@ export interface VueScriptOptions {
|
|
|
10
10
|
* @default false
|
|
11
11
|
*/
|
|
12
12
|
typescript?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* enable `eslint-plugin-vue-composable` rules
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
composable?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* enable `eslint-plugin-vue-scoped-css` rules
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
scopedCss?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* enable `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` rules
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
a11y?: boolean;
|
|
13
28
|
}
|
|
14
29
|
/**
|
|
15
|
-
* `eslint-plugin-vue` and overrides configuration options
|
|
30
|
+
* `eslint-plugin-vue`, `eslint-plugin-vue-composable`, `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` and overrides configuration options
|
|
16
31
|
* @param {VueScriptOptions & TypeScriptOptions & OverridesOptions} options
|
|
17
32
|
* eslint configuration options for Vue
|
|
18
33
|
* @returns {Promise<Linter.Config[]>}
|
|
19
|
-
* eslint flat configurations with `eslint-plugin-vue` and overrides
|
|
34
|
+
* eslint flat configurations with `eslint-plugin-vue`, `eslint-plugin-vue-composable`, `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` and overrides
|
|
20
35
|
*/
|
|
21
36
|
export declare function vue(options?: VueScriptOptions & TypeScriptOptions & OverridesOptions<VueRules>): Promise<Linter.Config[]>;
|
package/dist/configs/vue.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Linter } from 'eslint';
|
|
2
|
-
import type { TypeScriptOptions } from './typescript';
|
|
3
2
|
import type { OverridesOptions, VueRules } from '../types';
|
|
3
|
+
import type { TypeScriptOptions } from './typescript';
|
|
4
4
|
/**
|
|
5
5
|
* Vue configuration options
|
|
6
6
|
*/
|
|
@@ -10,12 +10,27 @@ export interface VueScriptOptions {
|
|
|
10
10
|
* @default false
|
|
11
11
|
*/
|
|
12
12
|
typescript?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* enable `eslint-plugin-vue-composable` rules
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
composable?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* enable `eslint-plugin-vue-scoped-css` rules
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
scopedCss?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* enable `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` rules
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
a11y?: boolean;
|
|
13
28
|
}
|
|
14
29
|
/**
|
|
15
|
-
* `eslint-plugin-vue` and overrides configuration options
|
|
30
|
+
* `eslint-plugin-vue`, `eslint-plugin-vue-composable`, `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` and overrides configuration options
|
|
16
31
|
* @param {VueScriptOptions & TypeScriptOptions & OverridesOptions} options
|
|
17
32
|
* eslint configuration options for Vue
|
|
18
33
|
* @returns {Promise<Linter.Config[]>}
|
|
19
|
-
* eslint flat configurations with `eslint-plugin-vue` and overrides
|
|
34
|
+
* eslint flat configurations with `eslint-plugin-vue`, `eslint-plugin-vue-composable`, `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` and overrides
|
|
20
35
|
*/
|
|
21
36
|
export declare function vue(options?: VueScriptOptions & TypeScriptOptions & OverridesOptions<VueRules>): Promise<Linter.Config[]>;
|
package/dist/index.cjs
CHANGED
|
@@ -177,6 +177,41 @@ async function jsdoc(options = {}) {
|
|
|
177
177
|
}];
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/configs/imports.ts
|
|
182
|
+
const IMPORTS_FILES = [GLOB_JS, GLOB_JSX, GLOB_TS, GLOB_TSX];
|
|
183
|
+
async function imports(options = {}) {
|
|
184
|
+
const { rules: overrideRules = {} } = options;
|
|
185
|
+
const unused = await loadPlugin("eslint-plugin-unused-imports");
|
|
186
|
+
const configs = [{
|
|
187
|
+
name: "unused-imports",
|
|
188
|
+
plugins: { "unused-imports": unused },
|
|
189
|
+
files: IMPORTS_FILES,
|
|
190
|
+
rules: {
|
|
191
|
+
"no-unused-vars": "off",
|
|
192
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
193
|
+
"unused-imports/no-unused-imports": "error",
|
|
194
|
+
"unused-imports/no-unused-vars": ["error", {
|
|
195
|
+
args: "all",
|
|
196
|
+
argsIgnorePattern: "^_",
|
|
197
|
+
caughtErrors: "all",
|
|
198
|
+
caughtErrorsIgnorePattern: "^_",
|
|
199
|
+
destructuredArrayIgnorePattern: "^_",
|
|
200
|
+
vars: "all",
|
|
201
|
+
varsIgnorePattern: "^_",
|
|
202
|
+
ignoreRestSiblings: true
|
|
203
|
+
}]
|
|
204
|
+
}
|
|
205
|
+
}];
|
|
206
|
+
const overriddenConfig = {
|
|
207
|
+
name: "@kazupon/imports",
|
|
208
|
+
files: IMPORTS_FILES,
|
|
209
|
+
rules: { ...overrideRules }
|
|
210
|
+
};
|
|
211
|
+
configs.push(overriddenConfig);
|
|
212
|
+
return configs;
|
|
213
|
+
}
|
|
214
|
+
|
|
180
215
|
//#endregion
|
|
181
216
|
//#region src/configs/promise.ts
|
|
182
217
|
async function promise(options = {}) {
|
|
@@ -348,15 +383,45 @@ const yaml = yml;
|
|
|
348
383
|
//#region src/configs/vue.ts
|
|
349
384
|
async function vue(options = {}) {
|
|
350
385
|
const { rules: overrideRules = {}, parserOptions = { project: true } } = options;
|
|
351
|
-
const useTypeScript = !!options.typescript;
|
|
352
386
|
const vue$1 = await loadPlugin("eslint-plugin-vue");
|
|
353
387
|
const vueParser = vue$1.configs["flat/base"][1]["languageOptions"]["parser"];
|
|
388
|
+
const configs = [];
|
|
389
|
+
configs.push(...vue$1.configs["flat/recommended"]);
|
|
390
|
+
if (options.composable) {
|
|
391
|
+
const composable = await loadPlugin("eslint-plugin-vue-composable");
|
|
392
|
+
const composableBase = { ...composable.configs["flat/recommended"][0] };
|
|
393
|
+
delete composableBase.languageOptions;
|
|
394
|
+
configs.push(composableBase, composable.configs["flat/recommended"][1]);
|
|
395
|
+
}
|
|
396
|
+
if (options.scopedCss) {
|
|
397
|
+
const scopedCss = await loadPlugin("eslint-plugin-vue-scoped-css");
|
|
398
|
+
const scopedCssMapped = scopedCss.configs["flat/recommended"].map((config, index) => {
|
|
399
|
+
return config.name ? config : {
|
|
400
|
+
name: `vue/scoped-css/recommended/${index}`,
|
|
401
|
+
...config
|
|
402
|
+
};
|
|
403
|
+
});
|
|
404
|
+
configs.push(scopedCssMapped[0], scopedCssMapped[2]);
|
|
405
|
+
}
|
|
406
|
+
if (options.a11y) {
|
|
407
|
+
const a11y = await loadPlugin("eslint-plugin-vuejs-accessibility");
|
|
408
|
+
const a11yBase = { ...a11y.configs["flat/recommended"][0] };
|
|
409
|
+
delete a11yBase.languageOptions;
|
|
410
|
+
configs.push(a11yBase);
|
|
411
|
+
const a11yRules = {
|
|
412
|
+
...a11y.configs["flat/recommended"][1],
|
|
413
|
+
name: "vuejs-accessibility:rules"
|
|
414
|
+
};
|
|
415
|
+
delete a11yRules.languageOptions;
|
|
416
|
+
delete a11yRules.plugins;
|
|
417
|
+
configs.push(a11yRules);
|
|
418
|
+
}
|
|
354
419
|
const customConfig = {
|
|
355
420
|
name: "@kazupon/vue",
|
|
356
421
|
files: [GLOB_VUE],
|
|
357
422
|
rules: { ...overrideRules }
|
|
358
423
|
};
|
|
359
|
-
if (
|
|
424
|
+
if (options.typescript) {
|
|
360
425
|
customConfig.languageOptions = {
|
|
361
426
|
parser: vueParser,
|
|
362
427
|
parserOptions: {
|
|
@@ -368,7 +433,8 @@ async function vue(options = {}) {
|
|
|
368
433
|
}
|
|
369
434
|
};
|
|
370
435
|
}
|
|
371
|
-
|
|
436
|
+
configs.push(customConfig);
|
|
437
|
+
return configs;
|
|
372
438
|
}
|
|
373
439
|
|
|
374
440
|
//#endregion
|
|
@@ -474,6 +540,12 @@ Object.defineProperty(exports, 'defineConfig', {
|
|
|
474
540
|
return defineConfig;
|
|
475
541
|
}
|
|
476
542
|
});
|
|
543
|
+
Object.defineProperty(exports, 'imports', {
|
|
544
|
+
enumerable: true,
|
|
545
|
+
get: function () {
|
|
546
|
+
return imports;
|
|
547
|
+
}
|
|
548
|
+
});
|
|
477
549
|
Object.defineProperty(exports, 'javascript', {
|
|
478
550
|
enumerable: true,
|
|
479
551
|
get: function () {
|
package/dist/index.js
CHANGED
|
@@ -153,6 +153,41 @@ async function jsdoc(options = {}) {
|
|
|
153
153
|
}];
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region src/configs/imports.ts
|
|
158
|
+
const IMPORTS_FILES = [GLOB_JS, GLOB_JSX, GLOB_TS, GLOB_TSX];
|
|
159
|
+
async function imports(options = {}) {
|
|
160
|
+
const { rules: overrideRules = {} } = options;
|
|
161
|
+
const unused = await loadPlugin("eslint-plugin-unused-imports");
|
|
162
|
+
const configs = [{
|
|
163
|
+
name: "unused-imports",
|
|
164
|
+
plugins: { "unused-imports": unused },
|
|
165
|
+
files: IMPORTS_FILES,
|
|
166
|
+
rules: {
|
|
167
|
+
"no-unused-vars": "off",
|
|
168
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
169
|
+
"unused-imports/no-unused-imports": "error",
|
|
170
|
+
"unused-imports/no-unused-vars": ["error", {
|
|
171
|
+
args: "all",
|
|
172
|
+
argsIgnorePattern: "^_",
|
|
173
|
+
caughtErrors: "all",
|
|
174
|
+
caughtErrorsIgnorePattern: "^_",
|
|
175
|
+
destructuredArrayIgnorePattern: "^_",
|
|
176
|
+
vars: "all",
|
|
177
|
+
varsIgnorePattern: "^_",
|
|
178
|
+
ignoreRestSiblings: true
|
|
179
|
+
}]
|
|
180
|
+
}
|
|
181
|
+
}];
|
|
182
|
+
const overriddenConfig = {
|
|
183
|
+
name: "@kazupon/imports",
|
|
184
|
+
files: IMPORTS_FILES,
|
|
185
|
+
rules: { ...overrideRules }
|
|
186
|
+
};
|
|
187
|
+
configs.push(overriddenConfig);
|
|
188
|
+
return configs;
|
|
189
|
+
}
|
|
190
|
+
|
|
156
191
|
//#endregion
|
|
157
192
|
//#region src/configs/promise.ts
|
|
158
193
|
async function promise(options = {}) {
|
|
@@ -324,15 +359,45 @@ const yaml = yml;
|
|
|
324
359
|
//#region src/configs/vue.ts
|
|
325
360
|
async function vue(options = {}) {
|
|
326
361
|
const { rules: overrideRules = {}, parserOptions = { project: true } } = options;
|
|
327
|
-
const useTypeScript = !!options.typescript;
|
|
328
362
|
const vue$1 = await loadPlugin("eslint-plugin-vue");
|
|
329
363
|
const vueParser = vue$1.configs["flat/base"][1]["languageOptions"]["parser"];
|
|
364
|
+
const configs = [];
|
|
365
|
+
configs.push(...vue$1.configs["flat/recommended"]);
|
|
366
|
+
if (options.composable) {
|
|
367
|
+
const composable = await loadPlugin("eslint-plugin-vue-composable");
|
|
368
|
+
const composableBase = { ...composable.configs["flat/recommended"][0] };
|
|
369
|
+
delete composableBase.languageOptions;
|
|
370
|
+
configs.push(composableBase, composable.configs["flat/recommended"][1]);
|
|
371
|
+
}
|
|
372
|
+
if (options.scopedCss) {
|
|
373
|
+
const scopedCss = await loadPlugin("eslint-plugin-vue-scoped-css");
|
|
374
|
+
const scopedCssMapped = scopedCss.configs["flat/recommended"].map((config, index) => {
|
|
375
|
+
return config.name ? config : {
|
|
376
|
+
name: `vue/scoped-css/recommended/${index}`,
|
|
377
|
+
...config
|
|
378
|
+
};
|
|
379
|
+
});
|
|
380
|
+
configs.push(scopedCssMapped[0], scopedCssMapped[2]);
|
|
381
|
+
}
|
|
382
|
+
if (options.a11y) {
|
|
383
|
+
const a11y = await loadPlugin("eslint-plugin-vuejs-accessibility");
|
|
384
|
+
const a11yBase = { ...a11y.configs["flat/recommended"][0] };
|
|
385
|
+
delete a11yBase.languageOptions;
|
|
386
|
+
configs.push(a11yBase);
|
|
387
|
+
const a11yRules = {
|
|
388
|
+
...a11y.configs["flat/recommended"][1],
|
|
389
|
+
name: "vuejs-accessibility:rules"
|
|
390
|
+
};
|
|
391
|
+
delete a11yRules.languageOptions;
|
|
392
|
+
delete a11yRules.plugins;
|
|
393
|
+
configs.push(a11yRules);
|
|
394
|
+
}
|
|
330
395
|
const customConfig = {
|
|
331
396
|
name: "@kazupon/vue",
|
|
332
397
|
files: [GLOB_VUE],
|
|
333
398
|
rules: { ...overrideRules }
|
|
334
399
|
};
|
|
335
|
-
if (
|
|
400
|
+
if (options.typescript) {
|
|
336
401
|
customConfig.languageOptions = {
|
|
337
402
|
parser: vueParser,
|
|
338
403
|
parserOptions: {
|
|
@@ -344,7 +409,8 @@ async function vue(options = {}) {
|
|
|
344
409
|
}
|
|
345
410
|
};
|
|
346
411
|
}
|
|
347
|
-
|
|
412
|
+
configs.push(customConfig);
|
|
413
|
+
return configs;
|
|
348
414
|
}
|
|
349
415
|
|
|
350
416
|
//#endregion
|
|
@@ -438,4 +504,4 @@ async function vitest(options = {}) {
|
|
|
438
504
|
}
|
|
439
505
|
|
|
440
506
|
//#endregion
|
|
441
|
-
export { comments, defineConfig, javascript, jsdoc, jsonc, prettier, promise, react, regexp, svelte, toml, typescript, unicorn, vitest, vue, yaml, yml };
|
|
507
|
+
export { comments, defineConfig, imports, javascript, jsdoc, jsonc, prettier, promise, react, regexp, svelte, toml, typescript, unicorn, vitest, vue, yaml, yml };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CommentsRules } from './comments';
|
|
2
|
+
import type { ImportsRules } from './imports';
|
|
2
3
|
import type { JavascriptRules } from './javascript';
|
|
3
4
|
import type { JsdocRules } from './jsdoc';
|
|
4
5
|
import type { JsoncRules } from './jsonc';
|
|
@@ -15,7 +16,7 @@ import type { VueRules } from './vue';
|
|
|
15
16
|
import type { YmlRules } from './yml';
|
|
16
17
|
declare module 'eslint' {
|
|
17
18
|
namespace Linter {
|
|
18
|
-
interface RulesRecord extends CommentsRules, JavascriptRules, JsdocRules, JsoncRules, PrettierRules, PromiseRules, ReactRules, RegexpRules, SvelteRules, TomlRules, TypescriptRules, UnicornRules, VitestRules, VueRules, YmlRules {
|
|
19
|
+
interface RulesRecord extends CommentsRules, ImportsRules, JavascriptRules, JsdocRules, JsoncRules, PrettierRules, PromiseRules, ReactRules, RegexpRules, SvelteRules, TomlRules, TypescriptRules, UnicornRules, VitestRules, VueRules, YmlRules {
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CommentsRules } from './comments';
|
|
2
|
+
import type { ImportsRules } from './imports';
|
|
2
3
|
import type { JavascriptRules } from './javascript';
|
|
3
4
|
import type { JsdocRules } from './jsdoc';
|
|
4
5
|
import type { JsoncRules } from './jsonc';
|
|
@@ -15,7 +16,7 @@ import type { VueRules } from './vue';
|
|
|
15
16
|
import type { YmlRules } from './yml';
|
|
16
17
|
declare module 'eslint' {
|
|
17
18
|
namespace Linter {
|
|
18
|
-
interface RulesRecord extends CommentsRules, JavascriptRules, JsdocRules, JsoncRules, PrettierRules, PromiseRules, ReactRules, RegexpRules, SvelteRules, TomlRules, TypescriptRules, UnicornRules, VitestRules, VueRules, YmlRules {
|
|
19
|
+
interface RulesRecord extends CommentsRules, ImportsRules, JavascriptRules, JsdocRules, JsoncRules, PrettierRules, PromiseRules, ReactRules, RegexpRules, SvelteRules, TomlRules, TypescriptRules, UnicornRules, VitestRules, VueRules, YmlRules {
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Linter } from 'eslint';
|
|
2
|
+
export interface ImportsRules {
|
|
3
|
+
/**
|
|
4
|
+
* Disallow unused variables
|
|
5
|
+
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
|
|
6
|
+
*/
|
|
7
|
+
'unused-imports/no-unused-imports'?: Linter.RuleEntry<UnusedImportsNoUnusedImports>;
|
|
8
|
+
/**
|
|
9
|
+
* Disallow unused variables
|
|
10
|
+
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-vars.md
|
|
11
|
+
*/
|
|
12
|
+
'unused-imports/no-unused-vars'?: Linter.RuleEntry<UnusedImportsNoUnusedVars>;
|
|
13
|
+
}
|
|
14
|
+
type UnusedImportsNoUnusedImports = [] | [
|
|
15
|
+
(("all" | "local") | {
|
|
16
|
+
vars?: ("all" | "local");
|
|
17
|
+
varsIgnorePattern?: string;
|
|
18
|
+
args?: ("all" | "after-used" | "none");
|
|
19
|
+
ignoreRestSiblings?: boolean;
|
|
20
|
+
argsIgnorePattern?: string;
|
|
21
|
+
caughtErrors?: ("all" | "none");
|
|
22
|
+
caughtErrorsIgnorePattern?: string;
|
|
23
|
+
destructuredArrayIgnorePattern?: string;
|
|
24
|
+
ignoreClassWithStaticInitBlock?: boolean;
|
|
25
|
+
reportUsedIgnorePattern?: boolean;
|
|
26
|
+
})
|
|
27
|
+
];
|
|
28
|
+
type UnusedImportsNoUnusedVars = [] | [
|
|
29
|
+
(("all" | "local") | {
|
|
30
|
+
vars?: ("all" | "local");
|
|
31
|
+
varsIgnorePattern?: string;
|
|
32
|
+
args?: ("all" | "after-used" | "none");
|
|
33
|
+
ignoreRestSiblings?: boolean;
|
|
34
|
+
argsIgnorePattern?: string;
|
|
35
|
+
caughtErrors?: ("all" | "none");
|
|
36
|
+
caughtErrorsIgnorePattern?: string;
|
|
37
|
+
destructuredArrayIgnorePattern?: string;
|
|
38
|
+
ignoreClassWithStaticInitBlock?: boolean;
|
|
39
|
+
reportUsedIgnorePattern?: boolean;
|
|
40
|
+
})
|
|
41
|
+
];
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Linter } from 'eslint';
|
|
2
|
+
export interface ImportsRules {
|
|
3
|
+
/**
|
|
4
|
+
* Disallow unused variables
|
|
5
|
+
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
|
|
6
|
+
*/
|
|
7
|
+
'unused-imports/no-unused-imports'?: Linter.RuleEntry<UnusedImportsNoUnusedImports>;
|
|
8
|
+
/**
|
|
9
|
+
* Disallow unused variables
|
|
10
|
+
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-vars.md
|
|
11
|
+
*/
|
|
12
|
+
'unused-imports/no-unused-vars'?: Linter.RuleEntry<UnusedImportsNoUnusedVars>;
|
|
13
|
+
}
|
|
14
|
+
type UnusedImportsNoUnusedImports = [] | [
|
|
15
|
+
(("all" | "local") | {
|
|
16
|
+
vars?: ("all" | "local");
|
|
17
|
+
varsIgnorePattern?: string;
|
|
18
|
+
args?: ("all" | "after-used" | "none");
|
|
19
|
+
ignoreRestSiblings?: boolean;
|
|
20
|
+
argsIgnorePattern?: string;
|
|
21
|
+
caughtErrors?: ("all" | "none");
|
|
22
|
+
caughtErrorsIgnorePattern?: string;
|
|
23
|
+
destructuredArrayIgnorePattern?: string;
|
|
24
|
+
ignoreClassWithStaticInitBlock?: boolean;
|
|
25
|
+
reportUsedIgnorePattern?: boolean;
|
|
26
|
+
})
|
|
27
|
+
];
|
|
28
|
+
type UnusedImportsNoUnusedVars = [] | [
|
|
29
|
+
(("all" | "local") | {
|
|
30
|
+
vars?: ("all" | "local");
|
|
31
|
+
varsIgnorePattern?: string;
|
|
32
|
+
args?: ("all" | "after-used" | "none");
|
|
33
|
+
ignoreRestSiblings?: boolean;
|
|
34
|
+
argsIgnorePattern?: string;
|
|
35
|
+
caughtErrors?: ("all" | "none");
|
|
36
|
+
caughtErrorsIgnorePattern?: string;
|
|
37
|
+
destructuredArrayIgnorePattern?: string;
|
|
38
|
+
ignoreClassWithStaticInitBlock?: boolean;
|
|
39
|
+
reportUsedIgnorePattern?: boolean;
|
|
40
|
+
})
|
|
41
|
+
];
|
|
42
|
+
export {};
|
|
@@ -1,5 +1,83 @@
|
|
|
1
1
|
import type { Linter } from 'eslint';
|
|
2
2
|
export interface VueRules {
|
|
3
|
+
'vue-composable/composable-placement'?: Linter.RuleEntry<[]>;
|
|
4
|
+
'vue-composable/lifecycle-placement'?: Linter.RuleEntry<[]>;
|
|
5
|
+
/**
|
|
6
|
+
* enforce the `<style>` tags to be plain or have the `scoped` or `module` attribute
|
|
7
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/enforce-style-type.html
|
|
8
|
+
*/
|
|
9
|
+
'vue-scoped-css/enforce-style-type'?: Linter.RuleEntry<VueScopedCssEnforceStyleType>;
|
|
10
|
+
/**
|
|
11
|
+
* disallow using deprecated deep combinators
|
|
12
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-deprecated-deep-combinator.html
|
|
13
|
+
*/
|
|
14
|
+
'vue-scoped-css/no-deprecated-deep-combinator'?: Linter.RuleEntry<[]>;
|
|
15
|
+
/**
|
|
16
|
+
* disallow v-enter and v-leave classes.
|
|
17
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-deprecated-v-enter-v-leave-class.html
|
|
18
|
+
*/
|
|
19
|
+
'vue-scoped-css/no-deprecated-v-enter-v-leave-class'?: Linter.RuleEntry<[]>;
|
|
20
|
+
/**
|
|
21
|
+
* disallow parent selector for `::v-global` pseudo-element
|
|
22
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-parent-of-v-global.html
|
|
23
|
+
*/
|
|
24
|
+
'vue-scoped-css/no-parent-of-v-global'?: Linter.RuleEntry<[]>;
|
|
25
|
+
/**
|
|
26
|
+
* disallow parsing errors in `<style>`
|
|
27
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-parsing-error.html
|
|
28
|
+
*/
|
|
29
|
+
'vue-scoped-css/no-parsing-error'?: Linter.RuleEntry<[]>;
|
|
30
|
+
/**
|
|
31
|
+
* disallow `@keyframes` which don't use in Scoped CSS
|
|
32
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-unused-keyframes.html
|
|
33
|
+
*/
|
|
34
|
+
'vue-scoped-css/no-unused-keyframes'?: Linter.RuleEntry<VueScopedCssNoUnusedKeyframes>;
|
|
35
|
+
/**
|
|
36
|
+
* disallow selectors defined in Scoped CSS that don't use in `<template>`
|
|
37
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-unused-selector.html
|
|
38
|
+
*/
|
|
39
|
+
'vue-scoped-css/no-unused-selector'?: Linter.RuleEntry<VueScopedCssNoUnusedSelector>;
|
|
40
|
+
/**
|
|
41
|
+
* enforce the `<style>` tags to has the `scoped` attribute
|
|
42
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-scoped.html
|
|
43
|
+
* @deprecated
|
|
44
|
+
*/
|
|
45
|
+
'vue-scoped-css/require-scoped'?: Linter.RuleEntry<VueScopedCssRequireScoped>;
|
|
46
|
+
/**
|
|
47
|
+
* disallow selectors defined that is not used inside `<template>`
|
|
48
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-selector-used-inside.html
|
|
49
|
+
*/
|
|
50
|
+
'vue-scoped-css/require-selector-used-inside'?: Linter.RuleEntry<VueScopedCssRequireSelectorUsedInside>;
|
|
51
|
+
/**
|
|
52
|
+
* require selector argument to be passed to `::v-deep()`
|
|
53
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-v-deep-argument.html
|
|
54
|
+
*/
|
|
55
|
+
'vue-scoped-css/require-v-deep-argument'?: Linter.RuleEntry<[]>;
|
|
56
|
+
/**
|
|
57
|
+
* require selector argument to be passed to `::v-global()`
|
|
58
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-v-global-argument.html
|
|
59
|
+
*/
|
|
60
|
+
'vue-scoped-css/require-v-global-argument'?: Linter.RuleEntry<[]>;
|
|
61
|
+
/**
|
|
62
|
+
* require selector argument to be passed to `::v-slotted()`
|
|
63
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-v-slotted-argument.html
|
|
64
|
+
*/
|
|
65
|
+
'vue-scoped-css/require-v-slotted-argument'?: Linter.RuleEntry<[]>;
|
|
66
|
+
/**
|
|
67
|
+
* enforce `:deep()`/`::v-deep()` style
|
|
68
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/v-deep-pseudo-style.html
|
|
69
|
+
*/
|
|
70
|
+
'vue-scoped-css/v-deep-pseudo-style'?: Linter.RuleEntry<VueScopedCssVDeepPseudoStyle>;
|
|
71
|
+
/**
|
|
72
|
+
* enforce `:global()`/`::v-global()` style
|
|
73
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/v-global-pseudo-style.html
|
|
74
|
+
*/
|
|
75
|
+
'vue-scoped-css/v-global-pseudo-style'?: Linter.RuleEntry<VueScopedCssVGlobalPseudoStyle>;
|
|
76
|
+
/**
|
|
77
|
+
* enforce `:slotted()`/`::v-slotted()` style
|
|
78
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/v-slotted-pseudo-style.html
|
|
79
|
+
*/
|
|
80
|
+
'vue-scoped-css/v-slotted-pseudo-style'?: Linter.RuleEntry<VueScopedCssVSlottedPseudoStyle>;
|
|
3
81
|
/**
|
|
4
82
|
* Enforce linebreaks after opening and before closing array brackets in `<template>`
|
|
5
83
|
* @see https://eslint.vuejs.org/rules/array-bracket-newline.html
|
|
@@ -1211,7 +1289,128 @@ export interface VueRules {
|
|
|
1211
1289
|
* @see https://eslint.vuejs.org/rules/valid-v-text.html
|
|
1212
1290
|
*/
|
|
1213
1291
|
'vue/valid-v-text'?: Linter.RuleEntry<[]>;
|
|
1292
|
+
/**
|
|
1293
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/alt-text.html
|
|
1294
|
+
*/
|
|
1295
|
+
'vuejs-accessibility/alt-text'?: Linter.RuleEntry<VuejsAccessibilityAltText>;
|
|
1296
|
+
/**
|
|
1297
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/anchor-has-content.html
|
|
1298
|
+
*/
|
|
1299
|
+
'vuejs-accessibility/anchor-has-content'?: Linter.RuleEntry<VuejsAccessibilityAnchorHasContent>;
|
|
1300
|
+
/**
|
|
1301
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/aria-props.html
|
|
1302
|
+
*/
|
|
1303
|
+
'vuejs-accessibility/aria-props'?: Linter.RuleEntry<[]>;
|
|
1304
|
+
/**
|
|
1305
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/aria-role.html
|
|
1306
|
+
*/
|
|
1307
|
+
'vuejs-accessibility/aria-role'?: Linter.RuleEntry<VuejsAccessibilityAriaRole>;
|
|
1308
|
+
/**
|
|
1309
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/aria-unsupported-elements.html
|
|
1310
|
+
*/
|
|
1311
|
+
'vuejs-accessibility/aria-unsupported-elements'?: Linter.RuleEntry<[]>;
|
|
1312
|
+
/**
|
|
1313
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/click-events-have-key-events.html
|
|
1314
|
+
*/
|
|
1315
|
+
'vuejs-accessibility/click-events-have-key-events'?: Linter.RuleEntry<[]>;
|
|
1316
|
+
/**
|
|
1317
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/form-control-has-label.html
|
|
1318
|
+
*/
|
|
1319
|
+
'vuejs-accessibility/form-control-has-label'?: Linter.RuleEntry<VuejsAccessibilityFormControlHasLabel>;
|
|
1320
|
+
/**
|
|
1321
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/heading-has-content.html
|
|
1322
|
+
*/
|
|
1323
|
+
'vuejs-accessibility/heading-has-content'?: Linter.RuleEntry<VuejsAccessibilityHeadingHasContent>;
|
|
1324
|
+
/**
|
|
1325
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/iframe-has-title.html
|
|
1326
|
+
*/
|
|
1327
|
+
'vuejs-accessibility/iframe-has-title'?: Linter.RuleEntry<[]>;
|
|
1328
|
+
/**
|
|
1329
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/interactive-supports-focus.html
|
|
1330
|
+
*/
|
|
1331
|
+
'vuejs-accessibility/interactive-supports-focus'?: Linter.RuleEntry<VuejsAccessibilityInteractiveSupportsFocus>;
|
|
1332
|
+
/**
|
|
1333
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/label-has-for.html
|
|
1334
|
+
*/
|
|
1335
|
+
'vuejs-accessibility/label-has-for'?: Linter.RuleEntry<VuejsAccessibilityLabelHasFor>;
|
|
1336
|
+
/**
|
|
1337
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/media-has-caption.html
|
|
1338
|
+
*/
|
|
1339
|
+
'vuejs-accessibility/media-has-caption'?: Linter.RuleEntry<VuejsAccessibilityMediaHasCaption>;
|
|
1340
|
+
/**
|
|
1341
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/mouse-events-have-key-events.html
|
|
1342
|
+
*/
|
|
1343
|
+
'vuejs-accessibility/mouse-events-have-key-events'?: Linter.RuleEntry<[]>;
|
|
1344
|
+
/**
|
|
1345
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-access-key.html
|
|
1346
|
+
*/
|
|
1347
|
+
'vuejs-accessibility/no-access-key'?: Linter.RuleEntry<[]>;
|
|
1348
|
+
/**
|
|
1349
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-aria-hidden-on-focusable.html
|
|
1350
|
+
*/
|
|
1351
|
+
'vuejs-accessibility/no-aria-hidden-on-focusable'?: Linter.RuleEntry<[]>;
|
|
1352
|
+
/**
|
|
1353
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-autofocus.html
|
|
1354
|
+
*/
|
|
1355
|
+
'vuejs-accessibility/no-autofocus'?: Linter.RuleEntry<VuejsAccessibilityNoAutofocus>;
|
|
1356
|
+
/**
|
|
1357
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-distracting-elements.html
|
|
1358
|
+
*/
|
|
1359
|
+
'vuejs-accessibility/no-distracting-elements'?: Linter.RuleEntry<VuejsAccessibilityNoDistractingElements>;
|
|
1360
|
+
/**
|
|
1361
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-onchange.html
|
|
1362
|
+
* @deprecated
|
|
1363
|
+
*/
|
|
1364
|
+
'vuejs-accessibility/no-onchange'?: Linter.RuleEntry<[]>;
|
|
1365
|
+
/**
|
|
1366
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-redundant-roles.html
|
|
1367
|
+
*/
|
|
1368
|
+
'vuejs-accessibility/no-redundant-roles'?: Linter.RuleEntry<VuejsAccessibilityNoRedundantRoles>;
|
|
1369
|
+
/**
|
|
1370
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-role-presentation-on-focusable.html
|
|
1371
|
+
*/
|
|
1372
|
+
'vuejs-accessibility/no-role-presentation-on-focusable'?: Linter.RuleEntry<[]>;
|
|
1373
|
+
/**
|
|
1374
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-static-element-interactions.html
|
|
1375
|
+
*/
|
|
1376
|
+
'vuejs-accessibility/no-static-element-interactions'?: Linter.RuleEntry<[]>;
|
|
1377
|
+
/**
|
|
1378
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/role-has-required-aria-props.html
|
|
1379
|
+
*/
|
|
1380
|
+
'vuejs-accessibility/role-has-required-aria-props'?: Linter.RuleEntry<[]>;
|
|
1381
|
+
/**
|
|
1382
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/tabindex-no-positive.html
|
|
1383
|
+
*/
|
|
1384
|
+
'vuejs-accessibility/tabindex-no-positive'?: Linter.RuleEntry<[]>;
|
|
1214
1385
|
}
|
|
1386
|
+
type VueScopedCssEnforceStyleType = [] | [
|
|
1387
|
+
{
|
|
1388
|
+
allows?: [("plain" | "scoped" | "module"), ...(("plain" | "scoped" | "module"))[]];
|
|
1389
|
+
}
|
|
1390
|
+
];
|
|
1391
|
+
type VueScopedCssNoUnusedKeyframes = [] | [
|
|
1392
|
+
{
|
|
1393
|
+
checkUnscoped?: boolean;
|
|
1394
|
+
}
|
|
1395
|
+
];
|
|
1396
|
+
type VueScopedCssNoUnusedSelector = [] | [
|
|
1397
|
+
{
|
|
1398
|
+
ignoreBEMModifier?: boolean;
|
|
1399
|
+
captureClassesFromDoc?: [] | [string];
|
|
1400
|
+
checkUnscoped?: boolean;
|
|
1401
|
+
}
|
|
1402
|
+
];
|
|
1403
|
+
type VueScopedCssRequireScoped = [] | [("always" | "never")];
|
|
1404
|
+
type VueScopedCssRequireSelectorUsedInside = [] | [
|
|
1405
|
+
{
|
|
1406
|
+
ignoreBEMModifier?: boolean;
|
|
1407
|
+
captureClassesFromDoc?: [] | [string];
|
|
1408
|
+
checkUnscoped?: boolean;
|
|
1409
|
+
}
|
|
1410
|
+
];
|
|
1411
|
+
type VueScopedCssVDeepPseudoStyle = [] | [(":deep" | "::v-deep")];
|
|
1412
|
+
type VueScopedCssVGlobalPseudoStyle = [] | [(":global" | "::v-global")];
|
|
1413
|
+
type VueScopedCssVSlottedPseudoStyle = [] | [(":slotted" | "::v-slotted")];
|
|
1215
1414
|
type VueArrayBracketNewline = [] | [
|
|
1216
1415
|
(("always" | "never" | "consistent") | {
|
|
1217
1416
|
multiline?: boolean;
|
|
@@ -2462,4 +2661,86 @@ type VueValidVSlot = [] | [
|
|
|
2462
2661
|
allowModifiers?: boolean;
|
|
2463
2662
|
}
|
|
2464
2663
|
];
|
|
2664
|
+
type VuejsAccessibilityAltText = [] | [
|
|
2665
|
+
{
|
|
2666
|
+
elements?: string[];
|
|
2667
|
+
img?: string[];
|
|
2668
|
+
object?: string[];
|
|
2669
|
+
area?: string[];
|
|
2670
|
+
"input[type=\"image\"]"?: string[];
|
|
2671
|
+
[k: string]: unknown | undefined;
|
|
2672
|
+
}
|
|
2673
|
+
];
|
|
2674
|
+
type VuejsAccessibilityAnchorHasContent = [] | [
|
|
2675
|
+
{
|
|
2676
|
+
components?: string[];
|
|
2677
|
+
accessibleChildren?: string[];
|
|
2678
|
+
accessibleDirectives?: string[];
|
|
2679
|
+
[k: string]: unknown | undefined;
|
|
2680
|
+
}
|
|
2681
|
+
];
|
|
2682
|
+
type VuejsAccessibilityAriaRole = [] | [
|
|
2683
|
+
{
|
|
2684
|
+
ignoreNonDOM?: boolean;
|
|
2685
|
+
}
|
|
2686
|
+
];
|
|
2687
|
+
type VuejsAccessibilityFormControlHasLabel = [] | [
|
|
2688
|
+
{
|
|
2689
|
+
labelComponents?: string[];
|
|
2690
|
+
controlComponents?: string[];
|
|
2691
|
+
[k: string]: unknown | undefined;
|
|
2692
|
+
}
|
|
2693
|
+
];
|
|
2694
|
+
type VuejsAccessibilityHeadingHasContent = [] | [
|
|
2695
|
+
{
|
|
2696
|
+
components?: string[];
|
|
2697
|
+
accessibleChildren?: string[];
|
|
2698
|
+
accessibleDirectives?: string[];
|
|
2699
|
+
[k: string]: unknown | undefined;
|
|
2700
|
+
}
|
|
2701
|
+
];
|
|
2702
|
+
type VuejsAccessibilityInteractiveSupportsFocus = [] | [
|
|
2703
|
+
{
|
|
2704
|
+
tabbable?: ("button" | "checkbox" | "columnheader" | "combobox" | "grid" | "gridcell" | "link" | "listbox" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "option" | "progressbar" | "radio" | "radiogroup" | "row" | "rowheader" | "scrollbar" | "searchbox" | "slider" | "spinbutton" | "switch" | "tab" | "tablist" | "textbox" | "tree" | "treegrid" | "treeitem" | "doc-backlink" | "doc-biblioref" | "doc-glossref" | "doc-noteref")[];
|
|
2705
|
+
[k: string]: unknown | undefined;
|
|
2706
|
+
}
|
|
2707
|
+
];
|
|
2708
|
+
type VuejsAccessibilityLabelHasFor = [] | [
|
|
2709
|
+
{
|
|
2710
|
+
components?: string[];
|
|
2711
|
+
controlComponents?: string[];
|
|
2712
|
+
required?: (("nesting" | "id") | {
|
|
2713
|
+
some: ("nesting" | "id")[];
|
|
2714
|
+
[k: string]: unknown | undefined;
|
|
2715
|
+
} | {
|
|
2716
|
+
every: ("nesting" | "id")[];
|
|
2717
|
+
[k: string]: unknown | undefined;
|
|
2718
|
+
});
|
|
2719
|
+
allowChildren?: boolean;
|
|
2720
|
+
[k: string]: unknown | undefined;
|
|
2721
|
+
}
|
|
2722
|
+
];
|
|
2723
|
+
type VuejsAccessibilityMediaHasCaption = [] | [
|
|
2724
|
+
{
|
|
2725
|
+
audio?: string[];
|
|
2726
|
+
track?: string[];
|
|
2727
|
+
video?: string[];
|
|
2728
|
+
[k: string]: unknown | undefined;
|
|
2729
|
+
}
|
|
2730
|
+
];
|
|
2731
|
+
type VuejsAccessibilityNoAutofocus = [] | [
|
|
2732
|
+
{
|
|
2733
|
+
ignoreNonDOM?: boolean;
|
|
2734
|
+
}
|
|
2735
|
+
];
|
|
2736
|
+
type VuejsAccessibilityNoDistractingElements = [] | [
|
|
2737
|
+
{
|
|
2738
|
+
[k: string]: unknown | undefined;
|
|
2739
|
+
}
|
|
2740
|
+
];
|
|
2741
|
+
type VuejsAccessibilityNoRedundantRoles = [] | [
|
|
2742
|
+
{
|
|
2743
|
+
[k: string]: string[] | undefined;
|
|
2744
|
+
}
|
|
2745
|
+
];
|
|
2465
2746
|
export {};
|
package/dist/types/gens/vue.d.ts
CHANGED
|
@@ -1,5 +1,83 @@
|
|
|
1
1
|
import type { Linter } from 'eslint';
|
|
2
2
|
export interface VueRules {
|
|
3
|
+
'vue-composable/composable-placement'?: Linter.RuleEntry<[]>;
|
|
4
|
+
'vue-composable/lifecycle-placement'?: Linter.RuleEntry<[]>;
|
|
5
|
+
/**
|
|
6
|
+
* enforce the `<style>` tags to be plain or have the `scoped` or `module` attribute
|
|
7
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/enforce-style-type.html
|
|
8
|
+
*/
|
|
9
|
+
'vue-scoped-css/enforce-style-type'?: Linter.RuleEntry<VueScopedCssEnforceStyleType>;
|
|
10
|
+
/**
|
|
11
|
+
* disallow using deprecated deep combinators
|
|
12
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-deprecated-deep-combinator.html
|
|
13
|
+
*/
|
|
14
|
+
'vue-scoped-css/no-deprecated-deep-combinator'?: Linter.RuleEntry<[]>;
|
|
15
|
+
/**
|
|
16
|
+
* disallow v-enter and v-leave classes.
|
|
17
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-deprecated-v-enter-v-leave-class.html
|
|
18
|
+
*/
|
|
19
|
+
'vue-scoped-css/no-deprecated-v-enter-v-leave-class'?: Linter.RuleEntry<[]>;
|
|
20
|
+
/**
|
|
21
|
+
* disallow parent selector for `::v-global` pseudo-element
|
|
22
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-parent-of-v-global.html
|
|
23
|
+
*/
|
|
24
|
+
'vue-scoped-css/no-parent-of-v-global'?: Linter.RuleEntry<[]>;
|
|
25
|
+
/**
|
|
26
|
+
* disallow parsing errors in `<style>`
|
|
27
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-parsing-error.html
|
|
28
|
+
*/
|
|
29
|
+
'vue-scoped-css/no-parsing-error'?: Linter.RuleEntry<[]>;
|
|
30
|
+
/**
|
|
31
|
+
* disallow `@keyframes` which don't use in Scoped CSS
|
|
32
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-unused-keyframes.html
|
|
33
|
+
*/
|
|
34
|
+
'vue-scoped-css/no-unused-keyframes'?: Linter.RuleEntry<VueScopedCssNoUnusedKeyframes>;
|
|
35
|
+
/**
|
|
36
|
+
* disallow selectors defined in Scoped CSS that don't use in `<template>`
|
|
37
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-unused-selector.html
|
|
38
|
+
*/
|
|
39
|
+
'vue-scoped-css/no-unused-selector'?: Linter.RuleEntry<VueScopedCssNoUnusedSelector>;
|
|
40
|
+
/**
|
|
41
|
+
* enforce the `<style>` tags to has the `scoped` attribute
|
|
42
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-scoped.html
|
|
43
|
+
* @deprecated
|
|
44
|
+
*/
|
|
45
|
+
'vue-scoped-css/require-scoped'?: Linter.RuleEntry<VueScopedCssRequireScoped>;
|
|
46
|
+
/**
|
|
47
|
+
* disallow selectors defined that is not used inside `<template>`
|
|
48
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-selector-used-inside.html
|
|
49
|
+
*/
|
|
50
|
+
'vue-scoped-css/require-selector-used-inside'?: Linter.RuleEntry<VueScopedCssRequireSelectorUsedInside>;
|
|
51
|
+
/**
|
|
52
|
+
* require selector argument to be passed to `::v-deep()`
|
|
53
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-v-deep-argument.html
|
|
54
|
+
*/
|
|
55
|
+
'vue-scoped-css/require-v-deep-argument'?: Linter.RuleEntry<[]>;
|
|
56
|
+
/**
|
|
57
|
+
* require selector argument to be passed to `::v-global()`
|
|
58
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-v-global-argument.html
|
|
59
|
+
*/
|
|
60
|
+
'vue-scoped-css/require-v-global-argument'?: Linter.RuleEntry<[]>;
|
|
61
|
+
/**
|
|
62
|
+
* require selector argument to be passed to `::v-slotted()`
|
|
63
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-v-slotted-argument.html
|
|
64
|
+
*/
|
|
65
|
+
'vue-scoped-css/require-v-slotted-argument'?: Linter.RuleEntry<[]>;
|
|
66
|
+
/**
|
|
67
|
+
* enforce `:deep()`/`::v-deep()` style
|
|
68
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/v-deep-pseudo-style.html
|
|
69
|
+
*/
|
|
70
|
+
'vue-scoped-css/v-deep-pseudo-style'?: Linter.RuleEntry<VueScopedCssVDeepPseudoStyle>;
|
|
71
|
+
/**
|
|
72
|
+
* enforce `:global()`/`::v-global()` style
|
|
73
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/v-global-pseudo-style.html
|
|
74
|
+
*/
|
|
75
|
+
'vue-scoped-css/v-global-pseudo-style'?: Linter.RuleEntry<VueScopedCssVGlobalPseudoStyle>;
|
|
76
|
+
/**
|
|
77
|
+
* enforce `:slotted()`/`::v-slotted()` style
|
|
78
|
+
* @see https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/v-slotted-pseudo-style.html
|
|
79
|
+
*/
|
|
80
|
+
'vue-scoped-css/v-slotted-pseudo-style'?: Linter.RuleEntry<VueScopedCssVSlottedPseudoStyle>;
|
|
3
81
|
/**
|
|
4
82
|
* Enforce linebreaks after opening and before closing array brackets in `<template>`
|
|
5
83
|
* @see https://eslint.vuejs.org/rules/array-bracket-newline.html
|
|
@@ -1211,7 +1289,128 @@ export interface VueRules {
|
|
|
1211
1289
|
* @see https://eslint.vuejs.org/rules/valid-v-text.html
|
|
1212
1290
|
*/
|
|
1213
1291
|
'vue/valid-v-text'?: Linter.RuleEntry<[]>;
|
|
1292
|
+
/**
|
|
1293
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/alt-text.html
|
|
1294
|
+
*/
|
|
1295
|
+
'vuejs-accessibility/alt-text'?: Linter.RuleEntry<VuejsAccessibilityAltText>;
|
|
1296
|
+
/**
|
|
1297
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/anchor-has-content.html
|
|
1298
|
+
*/
|
|
1299
|
+
'vuejs-accessibility/anchor-has-content'?: Linter.RuleEntry<VuejsAccessibilityAnchorHasContent>;
|
|
1300
|
+
/**
|
|
1301
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/aria-props.html
|
|
1302
|
+
*/
|
|
1303
|
+
'vuejs-accessibility/aria-props'?: Linter.RuleEntry<[]>;
|
|
1304
|
+
/**
|
|
1305
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/aria-role.html
|
|
1306
|
+
*/
|
|
1307
|
+
'vuejs-accessibility/aria-role'?: Linter.RuleEntry<VuejsAccessibilityAriaRole>;
|
|
1308
|
+
/**
|
|
1309
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/aria-unsupported-elements.html
|
|
1310
|
+
*/
|
|
1311
|
+
'vuejs-accessibility/aria-unsupported-elements'?: Linter.RuleEntry<[]>;
|
|
1312
|
+
/**
|
|
1313
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/click-events-have-key-events.html
|
|
1314
|
+
*/
|
|
1315
|
+
'vuejs-accessibility/click-events-have-key-events'?: Linter.RuleEntry<[]>;
|
|
1316
|
+
/**
|
|
1317
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/form-control-has-label.html
|
|
1318
|
+
*/
|
|
1319
|
+
'vuejs-accessibility/form-control-has-label'?: Linter.RuleEntry<VuejsAccessibilityFormControlHasLabel>;
|
|
1320
|
+
/**
|
|
1321
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/heading-has-content.html
|
|
1322
|
+
*/
|
|
1323
|
+
'vuejs-accessibility/heading-has-content'?: Linter.RuleEntry<VuejsAccessibilityHeadingHasContent>;
|
|
1324
|
+
/**
|
|
1325
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/iframe-has-title.html
|
|
1326
|
+
*/
|
|
1327
|
+
'vuejs-accessibility/iframe-has-title'?: Linter.RuleEntry<[]>;
|
|
1328
|
+
/**
|
|
1329
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/interactive-supports-focus.html
|
|
1330
|
+
*/
|
|
1331
|
+
'vuejs-accessibility/interactive-supports-focus'?: Linter.RuleEntry<VuejsAccessibilityInteractiveSupportsFocus>;
|
|
1332
|
+
/**
|
|
1333
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/label-has-for.html
|
|
1334
|
+
*/
|
|
1335
|
+
'vuejs-accessibility/label-has-for'?: Linter.RuleEntry<VuejsAccessibilityLabelHasFor>;
|
|
1336
|
+
/**
|
|
1337
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/media-has-caption.html
|
|
1338
|
+
*/
|
|
1339
|
+
'vuejs-accessibility/media-has-caption'?: Linter.RuleEntry<VuejsAccessibilityMediaHasCaption>;
|
|
1340
|
+
/**
|
|
1341
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/mouse-events-have-key-events.html
|
|
1342
|
+
*/
|
|
1343
|
+
'vuejs-accessibility/mouse-events-have-key-events'?: Linter.RuleEntry<[]>;
|
|
1344
|
+
/**
|
|
1345
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-access-key.html
|
|
1346
|
+
*/
|
|
1347
|
+
'vuejs-accessibility/no-access-key'?: Linter.RuleEntry<[]>;
|
|
1348
|
+
/**
|
|
1349
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-aria-hidden-on-focusable.html
|
|
1350
|
+
*/
|
|
1351
|
+
'vuejs-accessibility/no-aria-hidden-on-focusable'?: Linter.RuleEntry<[]>;
|
|
1352
|
+
/**
|
|
1353
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-autofocus.html
|
|
1354
|
+
*/
|
|
1355
|
+
'vuejs-accessibility/no-autofocus'?: Linter.RuleEntry<VuejsAccessibilityNoAutofocus>;
|
|
1356
|
+
/**
|
|
1357
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-distracting-elements.html
|
|
1358
|
+
*/
|
|
1359
|
+
'vuejs-accessibility/no-distracting-elements'?: Linter.RuleEntry<VuejsAccessibilityNoDistractingElements>;
|
|
1360
|
+
/**
|
|
1361
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-onchange.html
|
|
1362
|
+
* @deprecated
|
|
1363
|
+
*/
|
|
1364
|
+
'vuejs-accessibility/no-onchange'?: Linter.RuleEntry<[]>;
|
|
1365
|
+
/**
|
|
1366
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-redundant-roles.html
|
|
1367
|
+
*/
|
|
1368
|
+
'vuejs-accessibility/no-redundant-roles'?: Linter.RuleEntry<VuejsAccessibilityNoRedundantRoles>;
|
|
1369
|
+
/**
|
|
1370
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-role-presentation-on-focusable.html
|
|
1371
|
+
*/
|
|
1372
|
+
'vuejs-accessibility/no-role-presentation-on-focusable'?: Linter.RuleEntry<[]>;
|
|
1373
|
+
/**
|
|
1374
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/no-static-element-interactions.html
|
|
1375
|
+
*/
|
|
1376
|
+
'vuejs-accessibility/no-static-element-interactions'?: Linter.RuleEntry<[]>;
|
|
1377
|
+
/**
|
|
1378
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/role-has-required-aria-props.html
|
|
1379
|
+
*/
|
|
1380
|
+
'vuejs-accessibility/role-has-required-aria-props'?: Linter.RuleEntry<[]>;
|
|
1381
|
+
/**
|
|
1382
|
+
* @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/tabindex-no-positive.html
|
|
1383
|
+
*/
|
|
1384
|
+
'vuejs-accessibility/tabindex-no-positive'?: Linter.RuleEntry<[]>;
|
|
1214
1385
|
}
|
|
1386
|
+
type VueScopedCssEnforceStyleType = [] | [
|
|
1387
|
+
{
|
|
1388
|
+
allows?: [("plain" | "scoped" | "module"), ...(("plain" | "scoped" | "module"))[]];
|
|
1389
|
+
}
|
|
1390
|
+
];
|
|
1391
|
+
type VueScopedCssNoUnusedKeyframes = [] | [
|
|
1392
|
+
{
|
|
1393
|
+
checkUnscoped?: boolean;
|
|
1394
|
+
}
|
|
1395
|
+
];
|
|
1396
|
+
type VueScopedCssNoUnusedSelector = [] | [
|
|
1397
|
+
{
|
|
1398
|
+
ignoreBEMModifier?: boolean;
|
|
1399
|
+
captureClassesFromDoc?: [] | [string];
|
|
1400
|
+
checkUnscoped?: boolean;
|
|
1401
|
+
}
|
|
1402
|
+
];
|
|
1403
|
+
type VueScopedCssRequireScoped = [] | [("always" | "never")];
|
|
1404
|
+
type VueScopedCssRequireSelectorUsedInside = [] | [
|
|
1405
|
+
{
|
|
1406
|
+
ignoreBEMModifier?: boolean;
|
|
1407
|
+
captureClassesFromDoc?: [] | [string];
|
|
1408
|
+
checkUnscoped?: boolean;
|
|
1409
|
+
}
|
|
1410
|
+
];
|
|
1411
|
+
type VueScopedCssVDeepPseudoStyle = [] | [(":deep" | "::v-deep")];
|
|
1412
|
+
type VueScopedCssVGlobalPseudoStyle = [] | [(":global" | "::v-global")];
|
|
1413
|
+
type VueScopedCssVSlottedPseudoStyle = [] | [(":slotted" | "::v-slotted")];
|
|
1215
1414
|
type VueArrayBracketNewline = [] | [
|
|
1216
1415
|
(("always" | "never" | "consistent") | {
|
|
1217
1416
|
multiline?: boolean;
|
|
@@ -2462,4 +2661,86 @@ type VueValidVSlot = [] | [
|
|
|
2462
2661
|
allowModifiers?: boolean;
|
|
2463
2662
|
}
|
|
2464
2663
|
];
|
|
2664
|
+
type VuejsAccessibilityAltText = [] | [
|
|
2665
|
+
{
|
|
2666
|
+
elements?: string[];
|
|
2667
|
+
img?: string[];
|
|
2668
|
+
object?: string[];
|
|
2669
|
+
area?: string[];
|
|
2670
|
+
"input[type=\"image\"]"?: string[];
|
|
2671
|
+
[k: string]: unknown | undefined;
|
|
2672
|
+
}
|
|
2673
|
+
];
|
|
2674
|
+
type VuejsAccessibilityAnchorHasContent = [] | [
|
|
2675
|
+
{
|
|
2676
|
+
components?: string[];
|
|
2677
|
+
accessibleChildren?: string[];
|
|
2678
|
+
accessibleDirectives?: string[];
|
|
2679
|
+
[k: string]: unknown | undefined;
|
|
2680
|
+
}
|
|
2681
|
+
];
|
|
2682
|
+
type VuejsAccessibilityAriaRole = [] | [
|
|
2683
|
+
{
|
|
2684
|
+
ignoreNonDOM?: boolean;
|
|
2685
|
+
}
|
|
2686
|
+
];
|
|
2687
|
+
type VuejsAccessibilityFormControlHasLabel = [] | [
|
|
2688
|
+
{
|
|
2689
|
+
labelComponents?: string[];
|
|
2690
|
+
controlComponents?: string[];
|
|
2691
|
+
[k: string]: unknown | undefined;
|
|
2692
|
+
}
|
|
2693
|
+
];
|
|
2694
|
+
type VuejsAccessibilityHeadingHasContent = [] | [
|
|
2695
|
+
{
|
|
2696
|
+
components?: string[];
|
|
2697
|
+
accessibleChildren?: string[];
|
|
2698
|
+
accessibleDirectives?: string[];
|
|
2699
|
+
[k: string]: unknown | undefined;
|
|
2700
|
+
}
|
|
2701
|
+
];
|
|
2702
|
+
type VuejsAccessibilityInteractiveSupportsFocus = [] | [
|
|
2703
|
+
{
|
|
2704
|
+
tabbable?: ("button" | "checkbox" | "columnheader" | "combobox" | "grid" | "gridcell" | "link" | "listbox" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "option" | "progressbar" | "radio" | "radiogroup" | "row" | "rowheader" | "scrollbar" | "searchbox" | "slider" | "spinbutton" | "switch" | "tab" | "tablist" | "textbox" | "tree" | "treegrid" | "treeitem" | "doc-backlink" | "doc-biblioref" | "doc-glossref" | "doc-noteref")[];
|
|
2705
|
+
[k: string]: unknown | undefined;
|
|
2706
|
+
}
|
|
2707
|
+
];
|
|
2708
|
+
type VuejsAccessibilityLabelHasFor = [] | [
|
|
2709
|
+
{
|
|
2710
|
+
components?: string[];
|
|
2711
|
+
controlComponents?: string[];
|
|
2712
|
+
required?: (("nesting" | "id") | {
|
|
2713
|
+
some: ("nesting" | "id")[];
|
|
2714
|
+
[k: string]: unknown | undefined;
|
|
2715
|
+
} | {
|
|
2716
|
+
every: ("nesting" | "id")[];
|
|
2717
|
+
[k: string]: unknown | undefined;
|
|
2718
|
+
});
|
|
2719
|
+
allowChildren?: boolean;
|
|
2720
|
+
[k: string]: unknown | undefined;
|
|
2721
|
+
}
|
|
2722
|
+
];
|
|
2723
|
+
type VuejsAccessibilityMediaHasCaption = [] | [
|
|
2724
|
+
{
|
|
2725
|
+
audio?: string[];
|
|
2726
|
+
track?: string[];
|
|
2727
|
+
video?: string[];
|
|
2728
|
+
[k: string]: unknown | undefined;
|
|
2729
|
+
}
|
|
2730
|
+
];
|
|
2731
|
+
type VuejsAccessibilityNoAutofocus = [] | [
|
|
2732
|
+
{
|
|
2733
|
+
ignoreNonDOM?: boolean;
|
|
2734
|
+
}
|
|
2735
|
+
];
|
|
2736
|
+
type VuejsAccessibilityNoDistractingElements = [] | [
|
|
2737
|
+
{
|
|
2738
|
+
[k: string]: unknown | undefined;
|
|
2739
|
+
}
|
|
2740
|
+
];
|
|
2741
|
+
type VuejsAccessibilityNoRedundantRoles = [] | [
|
|
2742
|
+
{
|
|
2743
|
+
[k: string]: string[] | undefined;
|
|
2744
|
+
}
|
|
2745
|
+
];
|
|
2465
2746
|
export {};
|
package/dist/types/index.d.cts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './gens/javascript';
|
|
|
3
3
|
export * from './gens/unicorn';
|
|
4
4
|
export * from './gens/comments';
|
|
5
5
|
export * from './gens/jsdoc';
|
|
6
|
+
export * from './gens/imports';
|
|
6
7
|
export * from './gens/promise';
|
|
7
8
|
export * from './gens/prettier';
|
|
8
9
|
export * from './gens/regexp';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './gens/javascript';
|
|
|
3
3
|
export * from './gens/unicorn';
|
|
4
4
|
export * from './gens/comments';
|
|
5
5
|
export * from './gens/jsdoc';
|
|
6
|
+
export * from './gens/imports';
|
|
6
7
|
export * from './gens/promise';
|
|
7
8
|
export * from './gens/prettier';
|
|
8
9
|
export * from './gens/regexp';
|
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.16.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "kawakazu80@gmail.com",
|
|
7
7
|
"name": "kazuya kawaguchi"
|
|
@@ -60,7 +60,11 @@
|
|
|
60
60
|
"eslint-plugin-svelte": ">=2.43.0",
|
|
61
61
|
"eslint-plugin-toml": ">=0.11.0",
|
|
62
62
|
"eslint-plugin-unicorn": ">=54.0.0",
|
|
63
|
+
"eslint-plugin-unused-imports": ">=4.1.0",
|
|
63
64
|
"eslint-plugin-vue": ">=9.24.0",
|
|
65
|
+
"eslint-plugin-vue-composable": ">=1.0.0",
|
|
66
|
+
"eslint-plugin-vue-scoped-css": ">=2.8.0",
|
|
67
|
+
"eslint-plugin-vuejs-accessibility": ">=2.4.0",
|
|
64
68
|
"eslint-plugin-yml": ">=1.14.0",
|
|
65
69
|
"svelte": ">=4.0.0",
|
|
66
70
|
"typescript-eslint": ">=7.0.0"
|
|
@@ -102,9 +106,21 @@
|
|
|
102
106
|
"eslint-plugin-unicorn": {
|
|
103
107
|
"optional": true
|
|
104
108
|
},
|
|
109
|
+
"eslint-plugin-unused-imports": {
|
|
110
|
+
"optional": true
|
|
111
|
+
},
|
|
105
112
|
"eslint-plugin-vue": {
|
|
106
113
|
"optional": true
|
|
107
114
|
},
|
|
115
|
+
"eslint-plugin-vue-composable": {
|
|
116
|
+
"optional": true
|
|
117
|
+
},
|
|
118
|
+
"eslint-plugin-vue-scoped-css": {
|
|
119
|
+
"optional": true
|
|
120
|
+
},
|
|
121
|
+
"eslint-plugin-vuejs-accessibility": {
|
|
122
|
+
"optional": true
|
|
123
|
+
},
|
|
108
124
|
"eslint-plugin-yml": {
|
|
109
125
|
"optional": true
|
|
110
126
|
},
|
|
@@ -133,7 +149,11 @@
|
|
|
133
149
|
"eslint-plugin-svelte": "^2.43.0",
|
|
134
150
|
"eslint-plugin-toml": "^0.11.0",
|
|
135
151
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
152
|
+
"eslint-plugin-unused-imports": "^4.1.3",
|
|
136
153
|
"eslint-plugin-vue": "^9.27.0",
|
|
154
|
+
"eslint-plugin-vue-composable": "^1.0.0",
|
|
155
|
+
"eslint-plugin-vue-scoped-css": "^2.8.1",
|
|
156
|
+
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
137
157
|
"eslint-plugin-yml": "^1.14.0",
|
|
138
158
|
"eslint-typegen": "^0.3.1",
|
|
139
159
|
"gh-changelogen": "^0.2.8",
|