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

Commit 5493494

Browse files
committed
Update vue-i18n rules
1 parent ea6ad60 commit 5493494

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ 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 { NoRawTextRule } from './no-raw-text';
1112
import type { NoUnknownLocaleRule } from './no-unknown-locale';
1213
import type { NoUnusedKeysRule } from './no-unused-keys';
1314
import type { NoVHtmlRule } from './no-v-html';
@@ -29,6 +30,7 @@ export type VueI18nRules = KeyFormatStyleRule &
2930
NoI18nTPathPropRule &
3031
NoMissingKeysInOtherLocalesRule &
3132
NoMissingKeysRule &
33+
NoRawTextRule &
3234
NoUnknownLocaleRule &
3335
NoUnusedKeysRule &
3436
NoVHtmlRule &

src/rules/vue-i18n/no-raw-text.d.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Option.
5+
*/
6+
export interface NoRawTextOption {
7+
attributes?: {
8+
/**
9+
*/
10+
[k: string]: string[];
11+
};
12+
ignoreNodes?: any[];
13+
ignorePattern?: string;
14+
ignoreText?: any[];
15+
[k: string]: any;
16+
}
17+
18+
/**
19+
* Options.
20+
*/
21+
export type NoRawTextOptions = [NoRawTextOption?];
22+
23+
/**
24+
* Disallow to string literal in template or JSX.
25+
*
26+
* @see [no-raw-text](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-raw-text.html)
27+
*/
28+
export type NoRawTextRuleConfig = RuleConfig<NoRawTextOptions>;
29+
30+
/**
31+
* Disallow to string literal in template or JSX.
32+
*
33+
* @see [no-raw-text](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-raw-text.html)
34+
*/
35+
export interface NoRawTextRule {
36+
/**
37+
* Disallow to string literal in template or JSX.
38+
*
39+
* @see [no-raw-text](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-raw-text.html)
40+
*/
41+
'@intlify/vue-i18n/no-raw-text': NoRawTextRuleConfig;
42+
}

0 commit comments

Comments
 (0)