Skip to content

Commit b451cdb

Browse files
authoredMay 24, 2024··
fix: no-deprecated-tc rule wrong category (#515)
* fix: `no-deprecated-tc` rule wrong category * Create red-bulldogs-accept.md
1 parent 6709d63 commit b451cdb

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed
 

‎.changeset/red-bulldogs-accept.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@intlify/eslint-plugin-vue-i18n": patch
3+
---
4+
5+
fix: `no-deprecated-tc` rule wrong category

‎docs/rules/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
| [@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+) | |
1313
| [@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+) | |
1414
| [@intlify/vue-i18n/<wbr>no-deprecated-modulo-syntax](./no-deprecated-modulo-syntax.html) | enforce modulo interpolation to be named interpolation | :black_nib: |
15+
| [@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: |
1516
| [@intlify/vue-i18n/<wbr>no-html-messages](./no-html-messages.html) | disallow use HTML localization messages | :star: |
1617
| [@intlify/vue-i18n/<wbr>no-i18n-t-path-prop](./no-i18n-t-path-prop.html) | disallow using `path` prop with `<i18n-t>` | :black_nib: |
1718
| [@intlify/vue-i18n/<wbr>no-missing-keys](./no-missing-keys.html) | disallow missing locale message key at localization methods | :star: |
@@ -25,7 +26,6 @@
2526
| Rule ID | Description | |
2627
|:--------|:------------|:---|
2728
| [@intlify/vue-i18n/<wbr>key-format-style](./key-format-style.html) | enforce specific casing for localization keys | |
28-
| [@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) | |
2929
| [@intlify/vue-i18n/<wbr>no-duplicate-keys-in-locale](./no-duplicate-keys-in-locale.html) | disallow duplicate localization keys within the same locale | |
3030
| [@intlify/vue-i18n/<wbr>no-dynamic-keys](./no-dynamic-keys.html) | disallow localization dynamic keys at localization methods | |
3131
| [@intlify/vue-i18n/<wbr>no-missing-keys-in-other-locales](./no-missing-keys-in-other-locales.html) | disallow missing locale message keys in other locales | |

‎docs/rules/no-deprecated-tc.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ since: v3.0.0
88

99
> disallow using deprecated `tc` or `$tc` (Deprecated in Vue I18n 10.0.0, removed fully in Vue I18n 11.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 v9 to v10, `tc` or `$tc` should be replaced with `t` or `$t`.
1214

1315
## :book: Rule Details

‎lib/configs/flat/recommended.ts

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export = [
1919
{
2020
name: '@intlify/vue-i18n:recommended:rules',
2121
rules: {
22+
'@intlify/vue-i18n/no-deprecated-tc': 'warn',
2223
'@intlify/vue-i18n/no-html-messages': 'warn',
2324
'@intlify/vue-i18n/no-missing-keys': 'warn',
2425
'@intlify/vue-i18n/no-raw-text': 'warn',

‎lib/configs/recommended.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export = {
1313
es6: true
1414
},
1515
rules: {
16+
'@intlify/vue-i18n/no-deprecated-tc': 'warn',
1617
'@intlify/vue-i18n/no-html-messages': 'warn',
1718
'@intlify/vue-i18n/no-missing-keys': 'warn',
1819
'@intlify/vue-i18n/no-raw-text': 'warn',

‎lib/rules/no-deprecated-tc.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ function create(context: RuleContext): RuleListener {
4545

4646
export = createRule({
4747
meta: {
48-
type: 'suggestion',
48+
type: 'problem',
4949
docs: {
5050
description:
5151
'disallow using deprecated `tc` or `$tc` (Deprecated in Vue I18n 10.0.0, removed fully in Vue I18n 11.0.0)',
52-
category: 'Best Practices',
52+
category: 'Recommended',
5353
url: 'https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-tc.html',
54-
recommended: false
54+
recommended: true
5555
},
5656
fixable: null,
5757
schema: []

0 commit comments

Comments
 (0)
Please sign in to comment.