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

Commit 0c6b3a3

Browse files
committed
Update rules
1 parent a59ee44 commit 0c6b3a3

7 files changed

+145
-0
lines changed

src/rules/eslint/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ import type { NoUnsafeNegationRule } from './no-unsafe-negation';
205205
import type { NoUnsafeOptionalChainingRule } from './no-unsafe-optional-chaining';
206206
import type { NoUnusedExpressionsRule } from './no-unused-expressions';
207207
import type { NoUnusedLabelsRule } from './no-unused-labels';
208+
import type { NoUnusedPrivateClassMembersRule } from './no-unused-private-class-members';
208209
import type { NoUnusedVarsRule } from './no-unused-vars';
209210
import type { NoUseBeforeDefineRule } from './no-use-before-define';
210211
import type { NoUselessBackreferenceRule } from './no-useless-backreference';
@@ -491,6 +492,7 @@ export type EslintRules = AccessorPairsRule &
491492
NoUnsafeOptionalChainingRule &
492493
NoUnusedExpressionsRule &
493494
NoUnusedLabelsRule &
495+
NoUnusedPrivateClassMembersRule &
494496
NoUnusedVarsRule &
495497
NoUseBeforeDefineRule &
496498
NoUselessBackreferenceRule &
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+
* Disallow unused private class members.
5+
*
6+
* @see [no-unused-private-class-members](https://eslint.org/docs/rules/no-unused-private-class-members)
7+
*/
8+
export type NoUnusedPrivateClassMembersRuleConfig = RuleConfig<[]>;
9+
10+
/**
11+
* Disallow unused private class members.
12+
*
13+
* @see [no-unused-private-class-members](https://eslint.org/docs/rules/no-unused-private-class-members)
14+
*/
15+
export interface NoUnusedPrivateClassMembersRule {
16+
/**
17+
* Disallow unused private class members.
18+
*
19+
* @see [no-unused-private-class-members](https://eslint.org/docs/rules/no-unused-private-class-members)
20+
*/
21+
'no-unused-private-class-members': NoUnusedPrivateClassMembersRuleConfig;
22+
}

src/rules/vue/index.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import type { KeywordSpacingRule } from './keyword-spacing';
3838
import type { MatchComponentFileNameRule } from './match-component-file-name';
3939
import type { MaxAttributesPerLineRule } from './max-attributes-per-line';
4040
import type { MaxLenRule } from './max-len';
41+
import type { MultiWordComponentNamesRule } from './multi-word-component-names';
4142
import type { MultilineHtmlElementContentNewlineRule } from './multiline-html-element-content-newline';
4243
import type { MustacheInterpolationSpacingRule } from './mustache-interpolation-spacing';
4344
import type { NamePropertyCasingRule } from './name-property-casing';
@@ -46,6 +47,7 @@ import type { NextTickStyleRule } from './next-tick-style';
4647
import type { NoArrowFunctionsInWatchRule } from './no-arrow-functions-in-watch';
4748
import type { NoAsyncInComputedPropertiesRule } from './no-async-in-computed-properties';
4849
import type { NoBooleanDefaultRule } from './no-boolean-default';
50+
import type { NoComputedPropertiesInDataRule } from './no-computed-properties-in-data';
4951
import type { NoConfusingVForVIfRule } from './no-confusing-v-for-v-if';
5052
import type { NoConstantConditionRule } from './no-constant-condition';
5153
import type { NoCustomModifiersOnVModelRule } from './no-custom-modifiers-on-v-model';
@@ -59,6 +61,7 @@ import type { NoDeprecatedFunctionalTemplateRule } from './no-deprecated-functio
5961
import type { NoDeprecatedHtmlElementIsRule } from './no-deprecated-html-element-is';
6062
import type { NoDeprecatedInlineTemplateRule } from './no-deprecated-inline-template';
6163
import type { NoDeprecatedPropsDefaultThisRule } from './no-deprecated-props-default-this';
64+
import type { NoDeprecatedRouterLinkTagPropRule } from './no-deprecated-router-link-tag-prop';
6265
import type { NoDeprecatedScopeAttributeRule } from './no-deprecated-scope-attribute';
6366
import type { NoDeprecatedSlotAttributeRule } from './no-deprecated-slot-attribute';
6467
import type { NoDeprecatedSlotScopeAttributeRule } from './no-deprecated-slot-scope-attribute';
@@ -109,6 +112,7 @@ import type { NoTemplateShadowRule } from './no-template-shadow';
109112
import type { NoTemplateTargetBlankRule } from './no-template-target-blank';
110113
import type { NoTextareaMustacheRule } from './no-textarea-mustache';
111114
import type { NoThisInBeforeRouteEnterRule } from './no-this-in-before-route-enter';
115+
import type { NoUndefPropertiesRule } from './no-undef-properties';
112116
import type { NoUnregisteredComponentsRule } from './no-unregistered-components';
113117
import type { NoUnsupportedFeaturesRule } from './no-unsupported-features';
114118
import type { NoUnusedComponentsRule } from './no-unused-components';
@@ -234,6 +238,7 @@ export type VueRules = ArrayBracketNewlineRule &
234238
MatchComponentFileNameRule &
235239
MaxAttributesPerLineRule &
236240
MaxLenRule &
241+
MultiWordComponentNamesRule &
237242
MultilineHtmlElementContentNewlineRule &
238243
MustacheInterpolationSpacingRule &
239244
NamePropertyCasingRule &
@@ -242,6 +247,7 @@ export type VueRules = ArrayBracketNewlineRule &
242247
NoArrowFunctionsInWatchRule &
243248
NoAsyncInComputedPropertiesRule &
244249
NoBooleanDefaultRule &
250+
NoComputedPropertiesInDataRule &
245251
NoConfusingVForVIfRule &
246252
NoConstantConditionRule &
247253
NoCustomModifiersOnVModelRule &
@@ -255,6 +261,7 @@ export type VueRules = ArrayBracketNewlineRule &
255261
NoDeprecatedHtmlElementIsRule &
256262
NoDeprecatedInlineTemplateRule &
257263
NoDeprecatedPropsDefaultThisRule &
264+
NoDeprecatedRouterLinkTagPropRule &
258265
NoDeprecatedScopeAttributeRule &
259266
NoDeprecatedSlotAttributeRule &
260267
NoDeprecatedSlotScopeAttributeRule &
@@ -305,6 +312,7 @@ export type VueRules = ArrayBracketNewlineRule &
305312
NoTemplateTargetBlankRule &
306313
NoTextareaMustacheRule &
307314
NoThisInBeforeRouteEnterRule &
315+
NoUndefPropertiesRule &
308316
NoUnregisteredComponentsRule &
309317
NoUnsupportedFeaturesRule &
310318
NoUnusedComponentsRule &
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 component names to be always multi-word.
5+
*
6+
* @see [multi-word-component-names](https://eslint.vuejs.org/rules/multi-word-component-names.html)
7+
*/
8+
export type MultiWordComponentNamesRuleConfig = RuleConfig<[]>;
9+
10+
/**
11+
* Require component names to be always multi-word.
12+
*
13+
* @see [multi-word-component-names](https://eslint.vuejs.org/rules/multi-word-component-names.html)
14+
*/
15+
export interface MultiWordComponentNamesRule {
16+
/**
17+
* Require component names to be always multi-word.
18+
*
19+
* @see [multi-word-component-names](https://eslint.vuejs.org/rules/multi-word-component-names.html)
20+
*/
21+
'vue/multi-word-component-names': MultiWordComponentNamesRuleConfig;
22+
}
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+
* Disallow accessing computed properties in `data`.
5+
*
6+
* @see [no-computed-properties-in-data](https://eslint.vuejs.org/rules/no-computed-properties-in-data.html)
7+
*/
8+
export type NoComputedPropertiesInDataRuleConfig = RuleConfig<[]>;
9+
10+
/**
11+
* Disallow accessing computed properties in `data`.
12+
*
13+
* @see [no-computed-properties-in-data](https://eslint.vuejs.org/rules/no-computed-properties-in-data.html)
14+
*/
15+
export interface NoComputedPropertiesInDataRule {
16+
/**
17+
* Disallow accessing computed properties in `data`.
18+
*
19+
* @see [no-computed-properties-in-data](https://eslint.vuejs.org/rules/no-computed-properties-in-data.html)
20+
*/
21+
'vue/no-computed-properties-in-data': NoComputedPropertiesInDataRuleConfig;
22+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Option.
5+
*/
6+
export interface NoDeprecatedRouterLinkTagPropOption {
7+
components?: [string, ...string[]];
8+
[k: string]: any;
9+
}
10+
11+
/**
12+
* Options.
13+
*/
14+
export type NoDeprecatedRouterLinkTagPropOptions = [NoDeprecatedRouterLinkTagPropOption?];
15+
16+
/**
17+
* Disallow using deprecated `tag` property on `RouterLink` (in Vue.js 3.0.0+).
18+
*
19+
* @see [no-deprecated-router-link-tag-prop](https://eslint.vuejs.org/rules/no-deprecated-router-link-tag-prop.html)
20+
*/
21+
export type NoDeprecatedRouterLinkTagPropRuleConfig = RuleConfig<NoDeprecatedRouterLinkTagPropOptions>;
22+
23+
/**
24+
* Disallow using deprecated `tag` property on `RouterLink` (in Vue.js 3.0.0+).
25+
*
26+
* @see [no-deprecated-router-link-tag-prop](https://eslint.vuejs.org/rules/no-deprecated-router-link-tag-prop.html)
27+
*/
28+
export interface NoDeprecatedRouterLinkTagPropRule {
29+
/**
30+
* Disallow using deprecated `tag` property on `RouterLink` (in Vue.js 3.0.0+).
31+
*
32+
* @see [no-deprecated-router-link-tag-prop](https://eslint.vuejs.org/rules/no-deprecated-router-link-tag-prop.html)
33+
*/
34+
'vue/no-deprecated-router-link-tag-prop': NoDeprecatedRouterLinkTagPropRuleConfig;
35+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Option.
5+
*/
6+
export interface NoUndefPropertiesOption {
7+
ignores?: string[];
8+
}
9+
10+
/**
11+
* Options.
12+
*/
13+
export type NoUndefPropertiesOptions = [NoUndefPropertiesOption?];
14+
15+
/**
16+
* Disallow undefined properties.
17+
*
18+
* @see [no-undef-properties](https://eslint.vuejs.org/rules/no-undef-properties.html)
19+
*/
20+
export type NoUndefPropertiesRuleConfig = RuleConfig<NoUndefPropertiesOptions>;
21+
22+
/**
23+
* Disallow undefined properties.
24+
*
25+
* @see [no-undef-properties](https://eslint.vuejs.org/rules/no-undef-properties.html)
26+
*/
27+
export interface NoUndefPropertiesRule {
28+
/**
29+
* Disallow undefined properties.
30+
*
31+
* @see [no-undef-properties](https://eslint.vuejs.org/rules/no-undef-properties.html)
32+
*/
33+
'vue/no-undef-properties': NoUndefPropertiesRuleConfig;
34+
}

0 commit comments

Comments
 (0)