Skip to content

Commit 982b66c

Browse files
committed
🔧 config: add no-raw-text rule to recommended
1 parent e779a4e commit 982b66c

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

docs/rules/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
| Rule ID | Description | |
1717
|:--------|:------------|:---|
1818
| [vue-i18n/<wbr>no-dynamic-keys](./no-dynamic-keys.html) | disallow localization dynamic keys at localization methods | |
19-
| [vue-i18n/<wbr>no-raw-text](./no-raw-text.html) | disallow to string literal in template or JSX | |
19+
| [vue-i18n/<wbr>no-raw-text](./no-raw-text.html) | disallow to string literal in template or JSX | :star: |
2020
| [vue-i18n/<wbr>no-unused-keys](./no-unused-keys.html) | disallow unused localization keys | |
2121

docs/rules/no-raw-text.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
> disallow to string literal in template or JSX
44
5+
- :star: The `"extends": "plugin:vue-i18n/recommended"` property in a configuration file enables this rule.
6+
57
This rule warns the usage of string literal.
68

79
This rule encourage i18n in about the application needs to be localized.

lib/configs/recommended.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module.exports = {
1818
rules: {
1919
'vue-i18n/no-html-messages': 'warn',
2020
'vue-i18n/no-missing-keys': 'warn',
21+
'vue-i18n/no-raw-text': 'warn',
2122
'vue-i18n/no-v-html': 'warn'
2223
}
2324
}

lib/rules/no-raw-text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ module.exports = {
8181
docs: {
8282
description: 'disallow to string literal in template or JSX',
8383
category: 'Best Practices',
84-
recommended: false
84+
recommended: true
8585
},
8686
fixable: null,
8787
schema: []

0 commit comments

Comments
 (0)