Skip to content

Commit 7642d29

Browse files
authored
feat!: update recommended config (#520)
* feat!: update recommended config * Create light-cows-wonder.md
1 parent 350ac6e commit 7642d29

16 files changed

+40
-15
lines changed

.changeset/light-cows-wonder.md

Lines 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

Lines 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

Lines 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

Lines 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

Lines 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

Lines 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

Lines 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

Lines 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

Lines 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

Lines 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
}

0 commit comments

Comments
 (0)