Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 1f96626

Browse files
committed
Update rules for vue
1 parent ae25291 commit 1f96626

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Option.
5+
*/
6+
export type ComponentOptionsNameCasingOption = 'camelCase' | 'kebab-case' | 'PascalCase';
7+
8+
/**
9+
* Options.
10+
*/
11+
export type ComponentOptionsNameCasingOptions = [ComponentOptionsNameCasingOption?];
12+
13+
/**
14+
* Enforce the casing of component name in `components` options.
15+
*
16+
* @see [component-options-name-casing](https://eslint.vuejs.org/rules/component-options-name-casing.html)
17+
*/
18+
export type ComponentOptionsNameCasingRuleConfig = RuleConfig<ComponentOptionsNameCasingOptions>;
19+
20+
/**
21+
* Enforce the casing of component name in `components` options.
22+
*
23+
* @see [component-options-name-casing](https://eslint.vuejs.org/rules/component-options-name-casing.html)
24+
*/
25+
export interface ComponentOptionsNameCasingRule {
26+
/**
27+
* Enforce the casing of component name in `components` options.
28+
*
29+
* @see [component-options-name-casing](https://eslint.vuejs.org/rules/component-options-name-casing.html)
30+
*/
31+
'vue/component-options-name-casing': ComponentOptionsNameCasingRuleConfig;
32+
}

src/rules/vue/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import type { CommentDirectiveRule } from './comment-directive';
1515
import type { ComponentApiStyleRule } from './component-api-style';
1616
import type { ComponentDefinitionNameCasingRule } from './component-definition-name-casing';
1717
import type { ComponentNameInTemplateCasingRule } from './component-name-in-template-casing';
18+
import type { ComponentOptionsNameCasingRule } from './component-options-name-casing';
1819
import type { ComponentTagsOrderRule } from './component-tags-order';
1920
import type { CustomEventNameCasingRule } from './custom-event-name-casing';
2021
import type { DotLocationRule } from './dot-location';
@@ -143,6 +144,7 @@ import type { OneComponentPerFileRule } from './one-component-per-file';
143144
import type { OperatorLinebreakRule } from './operator-linebreak';
144145
import type { OrderInComponentsRule } from './order-in-components';
145146
import type { PaddingLineBetweenBlocksRule } from './padding-line-between-blocks';
147+
import type { PreferSeparateStaticClassRule } from './prefer-separate-static-class';
146148
import type { PreferTemplateRule } from './prefer-template';
147149
import type { PropNameCasingRule } from './prop-name-casing';
148150
import type { RequireComponentIsRule } from './require-component-is';
@@ -220,6 +222,7 @@ export type VueRules = ArrayBracketNewlineRule &
220222
ComponentApiStyleRule &
221223
ComponentDefinitionNameCasingRule &
222224
ComponentNameInTemplateCasingRule &
225+
ComponentOptionsNameCasingRule &
223226
ComponentTagsOrderRule &
224227
CustomEventNameCasingRule &
225228
DotLocationRule &
@@ -348,6 +351,7 @@ export type VueRules = ArrayBracketNewlineRule &
348351
OperatorLinebreakRule &
349352
OrderInComponentsRule &
350353
PaddingLineBetweenBlocksRule &
354+
PreferSeparateStaticClassRule &
351355
PreferTemplateRule &
352356
PropNameCasingRule &
353357
RequireComponentIsRule &
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Require static class names in template to be in a separate `class` attribute.
5+
*
6+
* @see [prefer-separate-static-class](https://eslint.vuejs.org/rules/prefer-separate-static-class.html)
7+
*/
8+
export type PreferSeparateStaticClassRuleConfig = RuleConfig<[]>;
9+
10+
/**
11+
* Require static class names in template to be in a separate `class` attribute.
12+
*
13+
* @see [prefer-separate-static-class](https://eslint.vuejs.org/rules/prefer-separate-static-class.html)
14+
*/
15+
export interface PreferSeparateStaticClassRule {
16+
/**
17+
* Require static class names in template to be in a separate `class` attribute.
18+
*
19+
* @see [prefer-separate-static-class](https://eslint.vuejs.org/rules/prefer-separate-static-class.html)
20+
*/
21+
'vue/prefer-separate-static-class': PreferSeparateStaticClassRuleConfig;
22+
}

0 commit comments

Comments
 (0)