-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add no-deprecated-v-t
rule
#580
Conversation
🦋 Changeset detectedLatest commit: 7e22f02 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Deploying eslint-plugin-vue-i18n with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rule seem good, but I have some comments regarding maintenance.
docs/rules/no-deprecated-v-t.md
Outdated
--- | ||
title: '@intlify/vue-i18n/no-deprecated-v-t' | ||
description: disallow using deprecated `v-t` custom directive (Deprecated in Vue I18n 11.0.0, removed fully in Vue I18n 12.0.0) | ||
since: v3.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be added automatically upon release.
since: v3.2.0 |
lib/rules/no-deprecated-v-t.ts
Outdated
'disallow using deprecated `v-t` custom directive (Deprecated in Vue I18n 11.0.0, removed fully in Vue I18n 12.0.0)', | ||
category: 'Recommended', | ||
url: 'https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-v-t.html', | ||
recommended: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing shareable configuration may be considered a breaking change.
recommended: true | |
recommended: false |
I think that in the next major version we can clarify the versioning policy and allow configuration to change in minor versions. v10 of eslint-plugin-vue will do that too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that in the next major version we can clarify the versioning policy and allow configuration to change in minor versions. v10 of eslint-plugin-vue will do that too.
I agree too.
eslint-plugin-vue-i18n have not had versioning policy so far.
We should define it.
tests/lib/rules/no-deprecated-v-t.ts
Outdated
}) | ||
|
||
tester.run('no-deprecated-v-t', rule as never, { | ||
valid: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be sure, could you add a test case to verify that other directives are not detected?
@ota-meshi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you
background
In vue-i18n v11,
v-t
custom directive is going to deprecated.vue-i18n has already published docs for breaking changes.
https://vue-i18n.intlify.dev/guide/migration/breaking11.html#deprecate-custom-directive-v-t
This rule supports migration.