Skip to content

Commit e42511c

Browse files
authored
Merge branch 'master' into breaking/eslint
2 parents 7d657b5 + 3f0c57f commit e42511c

9 files changed

+23
-9
lines changed

.changeset/gorgeous-snails-knock.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+
breaking: drop support for versions less than node v18

.changeset/red-bulldogs-accept.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": patch
3+
---
4+
5+
fix: `no-deprecated-tc` rule wrong category

docs/rules/index.md

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 3 additions & 3 deletions
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: []

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
"lint-staged": "^15.0.0",
111111
"mocha": "^10.2.0",
112112
"monaco-editor": "^0.48.0",
113-
"npm-run-all2": "6.1.2",
113+
"npm-run-all2": "6.2.0",
114114
"nyc": "^15.1.0",
115115
"opener": "^1.5.2",
116116
"path-scurry": "^1.10.1",

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)