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

Commit 9273deb

Browse files
committed
Update vue-i18n rules
1 parent 763a496 commit 9273deb

18 files changed

+118
-45
lines changed

src/rules/vue-i18n/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ import type { NoHtmlMessagesRule } from './no-html-messages';
88
import type { NoI18nTPathPropRule } from './no-i18n-t-path-prop';
99
import type { NoMissingKeysRule } from './no-missing-keys';
1010
import type { NoMissingKeysInOtherLocalesRule } from './no-missing-keys-in-other-locales';
11+
import type { NoUnknownLocaleRule } from './no-unknown-locale';
1112
import type { NoUnusedKeysRule } from './no-unused-keys';
1213
import type { NoVHtmlRule } from './no-v-html';
1314
import type { PreferLinkedKeyWithParenRule } from './prefer-linked-key-with-paren';
1415
import type { PreferSfcLangAttrRule } from './prefer-sfc-lang-attr';
16+
import type { SfcLocaleAttrRule } from './sfc-locale-attr';
1517
import type { ValidMessageSyntaxRule } from './valid-message-syntax';
1618

1719
/**
@@ -27,8 +29,10 @@ export type VueI18nRules = KeyFormatStyleRule &
2729
NoI18nTPathPropRule &
2830
NoMissingKeysInOtherLocalesRule &
2931
NoMissingKeysRule &
32+
NoUnknownLocaleRule &
3033
NoUnusedKeysRule &
3134
NoVHtmlRule &
3235
PreferLinkedKeyWithParenRule &
3336
PreferSfcLangAttrRule &
37+
SfcLocaleAttrRule &
3438
ValidMessageSyntaxRule;

src/rules/vue-i18n/key-format-style.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { RuleConfig } from '../rule-config';
55
*/
66
export interface KeyFormatStyleConfig {
77
allowArray?: boolean;
8+
splitByDots?: boolean;
89
}
910

1011
/**
@@ -27,20 +28,20 @@ export type KeyFormatStyleOptions = [
2728
/**
2829
* Enforce specific casing for localization keys.
2930
*
30-
*
31+
* @see [key-format-style](https://eslint-plugin-vue-i18n.intlify.dev/rules/key-format-style.html)
3132
*/
3233
export type KeyFormatStyleRuleConfig = RuleConfig<KeyFormatStyleOptions>;
3334

3435
/**
3536
* Enforce specific casing for localization keys.
3637
*
37-
*
38+
* @see [key-format-style](https://eslint-plugin-vue-i18n.intlify.dev/rules/key-format-style.html)
3839
*/
3940
export interface KeyFormatStyleRule {
4041
/**
4142
* Enforce specific casing for localization keys.
4243
*
43-
*
44+
* @see [key-format-style](https://eslint-plugin-vue-i18n.intlify.dev/rules/key-format-style.html)
4445
*/
4546
'@intlify/vue-i18n/key-format-style': KeyFormatStyleRuleConfig;
4647
}

src/rules/vue-i18n/no-deprecated-i18n-component.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Disallow using deprecated `<i18n>` components (in Vue I18n 9.0.0+).
55
*
6-
*
6+
* @see [no-deprecated-i18n-component](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-component.html)
77
*/
88
export type NoDeprecatedI18nComponentRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Disallow using deprecated `<i18n>` components (in Vue I18n 9.0.0+).
1212
*
13-
*
13+
* @see [no-deprecated-i18n-component](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-component.html)
1414
*/
1515
export interface NoDeprecatedI18nComponentRule {
1616
/**
1717
* Disallow using deprecated `<i18n>` components (in Vue I18n 9.0.0+).
1818
*
19-
*
19+
* @see [no-deprecated-i18n-component](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-component.html)
2020
*/
2121
'@intlify/vue-i18n/no-deprecated-i18n-component': NoDeprecatedI18nComponentRuleConfig;
2222
}

src/rules/vue-i18n/no-deprecated-i18n-place-attr.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Disallow using deprecated `place` attribute (Removed in Vue I18n 9.0.0+).
55
*
6-
*
6+
* @see [no-deprecated-i18n-place-attr](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-place-attr.html)
77
*/
88
export type NoDeprecatedI18nPlaceAttrRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Disallow using deprecated `place` attribute (Removed in Vue I18n 9.0.0+).
1212
*
13-
*
13+
* @see [no-deprecated-i18n-place-attr](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-place-attr.html)
1414
*/
1515
export interface NoDeprecatedI18nPlaceAttrRule {
1616
/**
1717
* Disallow using deprecated `place` attribute (Removed in Vue I18n 9.0.0+).
1818
*
19-
*
19+
* @see [no-deprecated-i18n-place-attr](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-place-attr.html)
2020
*/
2121
'@intlify/vue-i18n/no-deprecated-i18n-place-attr': NoDeprecatedI18nPlaceAttrRuleConfig;
2222
}

src/rules/vue-i18n/no-deprecated-i18n-places-prop.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Disallow using deprecated `places` prop (Removed in Vue I18n 9.0.0+).
55
*
6-
*
6+
* @see [no-deprecated-i18n-places-prop](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-places-prop.html)
77
*/
88
export type NoDeprecatedI18nPlacesPropRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Disallow using deprecated `places` prop (Removed in Vue I18n 9.0.0+).
1212
*
13-
*
13+
* @see [no-deprecated-i18n-places-prop](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-places-prop.html)
1414
*/
1515
export interface NoDeprecatedI18nPlacesPropRule {
1616
/**
1717
* Disallow using deprecated `places` prop (Removed in Vue I18n 9.0.0+).
1818
*
19-
*
19+
* @see [no-deprecated-i18n-places-prop](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-places-prop.html)
2020
*/
2121
'@intlify/vue-i18n/no-deprecated-i18n-places-prop': NoDeprecatedI18nPlacesPropRuleConfig;
2222
}

src/rules/vue-i18n/no-duplicate-keys-in-locale.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ export type NoDuplicateKeysInLocaleOptions = [NoDuplicateKeysInLocaleOption?];
1515
/**
1616
* Disallow duplicate localization keys within the same locale.
1717
*
18-
*
18+
* @see [no-duplicate-keys-in-locale](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-duplicate-keys-in-locale.html)
1919
*/
2020
export type NoDuplicateKeysInLocaleRuleConfig =
2121
RuleConfig<NoDuplicateKeysInLocaleOptions>;
2222

2323
/**
2424
* Disallow duplicate localization keys within the same locale.
2525
*
26-
*
26+
* @see [no-duplicate-keys-in-locale](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-duplicate-keys-in-locale.html)
2727
*/
2828
export interface NoDuplicateKeysInLocaleRule {
2929
/**
3030
* Disallow duplicate localization keys within the same locale.
3131
*
32-
*
32+
* @see [no-duplicate-keys-in-locale](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-duplicate-keys-in-locale.html)
3333
*/
3434
'@intlify/vue-i18n/no-duplicate-keys-in-locale': NoDuplicateKeysInLocaleRuleConfig;
3535
}

src/rules/vue-i18n/no-dynamic-keys.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Disallow localization dynamic keys at localization methods.
55
*
6-
*
6+
* @see [no-dynamic-keys](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-dynamic-keys.html)
77
*/
88
export type NoDynamicKeysRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Disallow localization dynamic keys at localization methods.
1212
*
13-
*
13+
* @see [no-dynamic-keys](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-dynamic-keys.html)
1414
*/
1515
export interface NoDynamicKeysRule {
1616
/**
1717
* Disallow localization dynamic keys at localization methods.
1818
*
19-
*
19+
* @see [no-dynamic-keys](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-dynamic-keys.html)
2020
*/
2121
'@intlify/vue-i18n/no-dynamic-keys': NoDynamicKeysRuleConfig;
2222
}

src/rules/vue-i18n/no-html-messages.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Disallow use HTML localization messages.
55
*
6-
*
6+
* @see [no-html-messages](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-html-messages.html)
77
*/
88
export type NoHtmlMessagesRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Disallow use HTML localization messages.
1212
*
13-
*
13+
* @see [no-html-messages](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-html-messages.html)
1414
*/
1515
export interface NoHtmlMessagesRule {
1616
/**
1717
* Disallow use HTML localization messages.
1818
*
19-
*
19+
* @see [no-html-messages](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-html-messages.html)
2020
*/
2121
'@intlify/vue-i18n/no-html-messages': NoHtmlMessagesRuleConfig;
2222
}

src/rules/vue-i18n/no-i18n-t-path-prop.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import type { RuleConfig } from '../rule-config';
33
/**
44
* Disallow using `path` prop with `<i18n-t>`.
55
*
6-
*
6+
* @see [no-i18n-t-path-prop](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-i18n-t-path-prop.html)
77
*/
88
export type NoI18nTPathPropRuleConfig = RuleConfig<[]>;
99

1010
/**
1111
* Disallow using `path` prop with `<i18n-t>`.
1212
*
13-
*
13+
* @see [no-i18n-t-path-prop](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-i18n-t-path-prop.html)
1414
*/
1515
export interface NoI18nTPathPropRule {
1616
/**
1717
* Disallow using `path` prop with `<i18n-t>`.
1818
*
19-
*
19+
* @see [no-i18n-t-path-prop](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-i18n-t-path-prop.html)
2020
*/
2121
'@intlify/vue-i18n/no-i18n-t-path-prop': NoI18nTPathPropRuleConfig;
2222
}

src/rules/vue-i18n/no-missing-keys-in-other-locales.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ export type NoMissingKeysInOtherLocalesOptions = [
1717
/**
1818
* Disallow missing locale message keys in other locales.
1919
*
20-
*
20+
* @see [no-missing-keys-in-other-locales](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-missing-keys-in-other-locales.html)
2121
*/
2222
export type NoMissingKeysInOtherLocalesRuleConfig =
2323
RuleConfig<NoMissingKeysInOtherLocalesOptions>;
2424

2525
/**
2626
* Disallow missing locale message keys in other locales.
2727
*
28-
*
28+
* @see [no-missing-keys-in-other-locales](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-missing-keys-in-other-locales.html)
2929
*/
3030
export interface NoMissingKeysInOtherLocalesRule {
3131
/**
3232
* Disallow missing locale message keys in other locales.
3333
*
34-
*
34+
* @see [no-missing-keys-in-other-locales](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-missing-keys-in-other-locales.html)
3535
*/
3636
'@intlify/vue-i18n/no-missing-keys-in-other-locales': NoMissingKeysInOtherLocalesRuleConfig;
3737
}

0 commit comments

Comments
 (0)