Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7642d29

Browse filesBrowse files
authored
feat!: update recommended config (#520)
* feat!: update recommended config * Create light-cows-wonder.md
1 parent 350ac6e commit 7642d29
Copy full SHA for 7642d29
Expand file treeCollapse file tree

16 files changed

+40
-15
lines changed

‎.changeset/light-cows-wonder.md

Copy file name to clipboard
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@intlify/eslint-plugin-vue-i18n": major
3+
---
4+
5+
feat!: update recommended config

‎docs/rules/index.md

Copy file name to clipboardExpand all lines: docs/rules/index.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
<!--prettier-ignore-->
99
| Rule ID | Description | |
1010
|:--------|:------------|:---|
11-
| [@intlify/vue-i18n/<wbr>no-deprecated-i18n-component](./no-deprecated-i18n-component.html) | disallow using deprecated `<i18n>` components (in Vue I18n 9.0.0+) | :black_nib: |
12-
| [@intlify/vue-i18n/<wbr>no-deprecated-i18n-place-attr](./no-deprecated-i18n-place-attr.html) | disallow using deprecated `place` attribute (Removed in Vue I18n 9.0.0+) | |
13-
| [@intlify/vue-i18n/<wbr>no-deprecated-i18n-places-prop](./no-deprecated-i18n-places-prop.html) | disallow using deprecated `places` prop (Removed in Vue I18n 9.0.0+) | |
14-
| [@intlify/vue-i18n/<wbr>no-deprecated-modulo-syntax](./no-deprecated-modulo-syntax.html) | enforce modulo interpolation to be named interpolation | :black_nib: |
11+
| [@intlify/vue-i18n/<wbr>no-deprecated-i18n-component](./no-deprecated-i18n-component.html) | disallow using deprecated `<i18n>` components (in Vue I18n 9.0.0+) | :star::black_nib: |
12+
| [@intlify/vue-i18n/<wbr>no-deprecated-i18n-place-attr](./no-deprecated-i18n-place-attr.html) | disallow using deprecated `place` attribute (Removed in Vue I18n 9.0.0+) | :star: |
13+
| [@intlify/vue-i18n/<wbr>no-deprecated-i18n-places-prop](./no-deprecated-i18n-places-prop.html) | disallow using deprecated `places` prop (Removed in Vue I18n 9.0.0+) | :star: |
14+
| [@intlify/vue-i18n/<wbr>no-deprecated-modulo-syntax](./no-deprecated-modulo-syntax.html) | enforce modulo interpolation to be named interpolation | :star::black_nib: |
1515
| [@intlify/vue-i18n/<wbr>no-deprecated-tc](./no-deprecated-tc.html) | disallow using deprecated `tc` or `$tc` (Deprecated in Vue I18n 10.0.0, removed fully in Vue I18n 11.0.0) | :star: |
1616
| [@intlify/vue-i18n/<wbr>no-html-messages](./no-html-messages.html) | disallow use HTML localization messages | :star: |
17-
| [@intlify/vue-i18n/<wbr>no-i18n-t-path-prop](./no-i18n-t-path-prop.html) | disallow using `path` prop with `<i18n-t>` | :black_nib: |
17+
| [@intlify/vue-i18n/<wbr>no-i18n-t-path-prop](./no-i18n-t-path-prop.html) | disallow using `path` prop with `<i18n-t>` | :star::black_nib: |
1818
| [@intlify/vue-i18n/<wbr>no-missing-keys](./no-missing-keys.html) | disallow missing locale message key at localization methods | :star: |
1919
| [@intlify/vue-i18n/<wbr>no-raw-text](./no-raw-text.html) | disallow to string literal in template or JSX | :star: |
2020
| [@intlify/vue-i18n/<wbr>no-v-html](./no-v-html.html) | disallow use of localization methods on v-html to prevent XSS attack | :star: |
21-
| [@intlify/vue-i18n/<wbr>valid-message-syntax](./valid-message-syntax.html) | disallow invalid message syntax | |
21+
| [@intlify/vue-i18n/<wbr>valid-message-syntax](./valid-message-syntax.html) | disallow invalid message syntax | :star: |
2222

2323
## Best Practices
2424

‎docs/rules/no-deprecated-i18n-component.md

Copy file name to clipboardExpand all lines: docs/rules/no-deprecated-i18n-component.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ since: v0.11.0
88

99
> disallow using deprecated `<i18n>` components (in Vue I18n 9.0.0+)
1010
11+
- :star: The `"extends": "plugin:@intlify/vue-i18n/recommended"` or `*.configs["flat/recommended"]` property in a configuration file enables this rule.
1112
- :black_nib:️ The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.
1213

1314
If you are migrating from Vue I18n v8 to v9, the `<i18n>` component should be replaced with the `<i18n-t>` component.

‎docs/rules/no-deprecated-i18n-place-attr.md

Copy file name to clipboardExpand all lines: docs/rules/no-deprecated-i18n-place-attr.md
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ since: v0.11.0
88

99
> disallow using deprecated `place` attribute (Removed in Vue I18n 9.0.0+)
1010
11+
- :star: The `"extends": "plugin:@intlify/vue-i18n/recommended"` or `*.configs["flat/recommended"]` property in a configuration file enables this rule.
12+
1113
If you are migrating from Vue I18n v8 to v9, the `place` attribute should be replaced with the `v-slot`.
1214

1315
## :book: Rule Details

‎docs/rules/no-deprecated-i18n-places-prop.md

Copy file name to clipboardExpand all lines: docs/rules/no-deprecated-i18n-places-prop.md
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ since: v0.11.0
88

99
> disallow using deprecated `places` prop (Removed in Vue I18n 9.0.0+)
1010
11+
- :star: The `"extends": "plugin:@intlify/vue-i18n/recommended"` or `*.configs["flat/recommended"]` property in a configuration file enables this rule.
12+
1113
If you are migrating from Vue I18n v8 to v9, the `places` prop should be replaced with the `v-slot`.
1214

1315
## :book: Rule Details

‎docs/rules/no-deprecated-modulo-syntax.md

Copy file name to clipboardExpand all lines: docs/rules/no-deprecated-modulo-syntax.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ since: v3.0.0
88

99
> enforce modulo interpolation to be named interpolation
1010
11+
- :star: The `"extends": "plugin:@intlify/vue-i18n/recommended"` or `*.configs["flat/recommended"]` property in a configuration file enables this rule.
1112
- :black_nib:️ The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.
1213

1314
This rule enforces modulo interpolation to be named interpolation

‎docs/rules/no-i18n-t-path-prop.md

Copy file name to clipboardExpand all lines: docs/rules/no-i18n-t-path-prop.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ since: v0.11.0
88

99
> disallow using `path` prop with `<i18n-t>`
1010
11+
- :star: The `"extends": "plugin:@intlify/vue-i18n/recommended"` or `*.configs["flat/recommended"]` property in a configuration file enables this rule.
1112
- :black_nib:️ The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.
1213

1314
You cannot use `path` prop with `<i18n-t>` component. Perhaps it's an old habit mistake.

‎docs/rules/valid-message-syntax.md

Copy file name to clipboardExpand all lines: docs/rules/valid-message-syntax.md
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ since: v0.10.0
88

99
> disallow invalid message syntax
1010
11+
- :star: The `"extends": "plugin:@intlify/vue-i18n/recommended"` or `*.configs["flat/recommended"]` property in a configuration file enables this rule.
12+
1113
This rule warns invalid message syntax.
1214

1315
This rule is useful localization leaks with incorrect message syntax.

‎lib/configs/flat/recommended.ts

Copy file name to clipboardExpand all lines: lib/configs/flat/recommended.ts
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ export = [
1919
{
2020
name: '@intlify/vue-i18n:recommended:rules',
2121
rules: {
22+
'@intlify/vue-i18n/no-deprecated-i18n-component': 'warn',
23+
'@intlify/vue-i18n/no-deprecated-i18n-place-attr': 'warn',
24+
'@intlify/vue-i18n/no-deprecated-i18n-places-prop': 'warn',
25+
'@intlify/vue-i18n/no-deprecated-modulo-syntax': 'warn',
2226
'@intlify/vue-i18n/no-deprecated-tc': 'warn',
2327
'@intlify/vue-i18n/no-html-messages': 'warn',
28+
'@intlify/vue-i18n/no-i18n-t-path-prop': 'warn',
2429
'@intlify/vue-i18n/no-missing-keys': 'warn',
2530
'@intlify/vue-i18n/no-raw-text': 'warn',
26-
'@intlify/vue-i18n/no-v-html': 'warn'
31+
'@intlify/vue-i18n/no-v-html': 'warn',
32+
'@intlify/vue-i18n/valid-message-syntax': 'warn'
2733
}
2834
}
2935
]

‎lib/configs/recommended.ts

Copy file name to clipboardExpand all lines: lib/configs/recommended.ts
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,16 @@ export = {
1313
es6: true
1414
},
1515
rules: {
16+
'@intlify/vue-i18n/no-deprecated-i18n-component': 'warn',
17+
'@intlify/vue-i18n/no-deprecated-i18n-place-attr': 'warn',
18+
'@intlify/vue-i18n/no-deprecated-i18n-places-prop': 'warn',
19+
'@intlify/vue-i18n/no-deprecated-modulo-syntax': 'warn',
1620
'@intlify/vue-i18n/no-deprecated-tc': 'warn',
1721
'@intlify/vue-i18n/no-html-messages': 'warn',
22+
'@intlify/vue-i18n/no-i18n-t-path-prop': 'warn',
1823
'@intlify/vue-i18n/no-missing-keys': 'warn',
1924
'@intlify/vue-i18n/no-raw-text': 'warn',
20-
'@intlify/vue-i18n/no-v-html': 'warn'
25+
'@intlify/vue-i18n/no-v-html': 'warn',
26+
'@intlify/vue-i18n/valid-message-syntax': 'warn'
2127
}
2228
}

‎lib/rules/no-deprecated-i18n-component.ts

Copy file name to clipboardExpand all lines: lib/rules/no-deprecated-i18n-component.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export = createRule({
9292
'disallow using deprecated `<i18n>` components (in Vue I18n 9.0.0+)',
9393
category: 'Recommended',
9494
url: 'https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-component.html',
95-
recommended: false
95+
recommended: true
9696
},
9797
fixable: 'code',
9898
schema: [],

‎lib/rules/no-deprecated-i18n-place-attr.ts

Copy file name to clipboardExpand all lines: lib/rules/no-deprecated-i18n-place-attr.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export = createRule({
4141
'disallow using deprecated `place` attribute (Removed in Vue I18n 9.0.0+)',
4242
category: 'Recommended',
4343
url: 'https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-place-attr.html',
44-
recommended: false
44+
recommended: true
4545
},
4646
fixable: null,
4747
schema: [],

‎lib/rules/no-deprecated-i18n-places-prop.ts

Copy file name to clipboardExpand all lines: lib/rules/no-deprecated-i18n-places-prop.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export = createRule({
3636
'disallow using deprecated `places` prop (Removed in Vue I18n 9.0.0+)',
3737
category: 'Recommended',
3838
url: 'https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-places-prop.html',
39-
recommended: false
39+
recommended: true
4040
},
4141
fixable: null,
4242
schema: [],

‎lib/rules/no-deprecated-modulo-syntax.ts

Copy file name to clipboardExpand all lines: lib/rules/no-deprecated-modulo-syntax.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export = createRule({
123123
description: 'enforce modulo interpolation to be named interpolation',
124124
category: 'Recommended',
125125
url: 'https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-modulo-syntax.html',
126-
recommended: false
126+
recommended: true
127127
},
128128
fixable: 'code',
129129
schema: []

‎lib/rules/no-i18n-t-path-prop.ts

Copy file name to clipboardExpand all lines: lib/rules/no-i18n-t-path-prop.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export = createRule({
4242
description: 'disallow using `path` prop with `<i18n-t>`',
4343
category: 'Recommended',
4444
url: 'https://eslint-plugin-vue-i18n.intlify.dev/rules/no-i18n-t-path-prop.html',
45-
recommended: false
45+
recommended: true
4646
},
4747
fixable: 'code',
4848
schema: [],

‎lib/rules/valid-message-syntax.ts

Copy file name to clipboardExpand all lines: lib/rules/valid-message-syntax.ts
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ export = createRule({
208208
description: 'disallow invalid message syntax',
209209
category: 'Recommended',
210210
url: 'https://eslint-plugin-vue-i18n.intlify.dev/rules/valid-message-syntax.html',
211-
// TODO To avoid breaking changes, include it in the configuration at the time of version upgrade.
212-
recommended: false
211+
recommended: true
213212
},
214213
fixable: null,
215214
schema: [

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.