Skip to content

Commit

Permalink
Merge branch 'master' into breaking/eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed May 24, 2024
2 parents 7d657b5 + 3f0c57f commit e42511c
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-snails-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@intlify/eslint-plugin-vue-i18n": major
---

breaking: drop support for versions less than node v18
5 changes: 5 additions & 0 deletions .changeset/red-bulldogs-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@intlify/eslint-plugin-vue-i18n": patch
---

fix: `no-deprecated-tc` rule wrong category
2 changes: 1 addition & 1 deletion docs/rules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
| [@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+) | |
| [@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+) | |
| [@intlify/vue-i18n/<wbr>no-deprecated-modulo-syntax](./no-deprecated-modulo-syntax.html) | enforce modulo interpolation to be named interpolation | :black_nib: |
| [@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: |
| [@intlify/vue-i18n/<wbr>no-html-messages](./no-html-messages.html) | disallow use HTML localization messages | :star: |
| [@intlify/vue-i18n/<wbr>no-i18n-t-path-prop](./no-i18n-t-path-prop.html) | disallow using `path` prop with `<i18n-t>` | :black_nib: |
| [@intlify/vue-i18n/<wbr>no-missing-keys](./no-missing-keys.html) | disallow missing locale message key at localization methods | :star: |
Expand All @@ -25,7 +26,6 @@
| Rule ID | Description | |
|:--------|:------------|:---|
| [@intlify/vue-i18n/<wbr>key-format-style](./key-format-style.html) | enforce specific casing for localization keys | |
| [@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) | |
| [@intlify/vue-i18n/<wbr>no-duplicate-keys-in-locale](./no-duplicate-keys-in-locale.html) | disallow duplicate localization keys within the same locale | |
| [@intlify/vue-i18n/<wbr>no-dynamic-keys](./no-dynamic-keys.html) | disallow localization dynamic keys at localization methods | |
| [@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 | |
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/no-deprecated-tc.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ since: v3.0.0

> disallow using deprecated `tc` or `$tc` (Deprecated in Vue I18n 10.0.0, removed fully in Vue I18n 11.0.0)
- :star: The `"extends": "plugin:@intlify/vue-i18n/recommended"` or `*.configs["flat/recommended"]` property in a configuration file enables this rule.

If you are migrating from Vue I18n v9 to v10, `tc` or `$tc` should be replaced with `t` or `$t`.

## :book: Rule Details
Expand Down
1 change: 1 addition & 0 deletions lib/configs/flat/recommended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export = [
{
name: '@intlify/vue-i18n:recommended:rules',
rules: {
'@intlify/vue-i18n/no-deprecated-tc': 'warn',
'@intlify/vue-i18n/no-html-messages': 'warn',
'@intlify/vue-i18n/no-missing-keys': 'warn',
'@intlify/vue-i18n/no-raw-text': 'warn',
Expand Down
1 change: 1 addition & 0 deletions lib/configs/recommended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export = {
es6: true
},
rules: {
'@intlify/vue-i18n/no-deprecated-tc': 'warn',
'@intlify/vue-i18n/no-html-messages': 'warn',
'@intlify/vue-i18n/no-missing-keys': 'warn',
'@intlify/vue-i18n/no-raw-text': 'warn',
Expand Down
6 changes: 3 additions & 3 deletions lib/rules/no-deprecated-tc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ function create(context: RuleContext): RuleListener {

export = createRule({
meta: {
type: 'suggestion',
type: 'problem',
docs: {
description:
'disallow using deprecated `tc` or `$tc` (Deprecated in Vue I18n 10.0.0, removed fully in Vue I18n 11.0.0)',
category: 'Best Practices',
category: 'Recommended',
url: 'https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-tc.html',
recommended: false
recommended: true
},
fixable: null,
schema: []
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"lint-staged": "^15.0.0",
"mocha": "^10.2.0",
"monaco-editor": "^0.48.0",
"npm-run-all2": "6.1.2",
"npm-run-all2": "6.2.0",
"nyc": "^15.1.0",
"opener": "^1.5.2",
"path-scurry": "^1.10.1",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e42511c

Please sign in to comment.