-
-
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
Other custom rules do not work properly export for those are in @intlify/vue-i18n/recommended
#478
Comments
Is this related to Vue3? Since we have used this in Vue2 env it worked as expected. |
@ota-meshi Hi, I understand you might be very busy, but I would be grateful if you could take a look at this when you're available. Thank you! 🙇 |
Hi @ota-meshi, Thank you for updating this plugin last week! I’ve upgraded eslintrc.cjs/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
root: true,
env: {
es2020: true,
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-essential',
'plugin:vue/vue3-recommended',
'plugin:vuetify/recommended',
'@vue/eslint-config-typescript/recommended',
'@vue/eslint-config-prettier',
'airbnb-base',
'plugin:json/recommended',
'prettier',
'plugin:storybook/recommended',
'plugin:playwright/recommended',
'.eslintrc-auto-import.json',
'plugin:@intlify/vue-i18n/recommended',
],
parserOptions: {
// To avoid "Parsing error: Expected to be an expression, but got empty" on .json files
// https://eslint-plugin-vue-i18n.intlify.dev/started.html#how-to-use-custom-parser
// https://eslint.org/docs/latest/use/configure/parser#configure-a-custom-parser
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
},
plugins: ['vue'],
settings: {
// https://eslint-plugin-vue-i18n.intlify.dev/started.html#settings-vue-i18n
'vue-i18n': {
localeDir: './src/assets/language/*.json',
},
'import/resolver': {
typescript: {
project: './tsconfig.json',
},
},
},
rules: {
'@intlify/vue-i18n/no-unused-keys': [
'error',
{
extensions: ['.ts', '.vue'],
},
],
'@intlify/vue-i18n/key-format-style': [
'error',
'camelCase',
{
allowArray: false,
splitByDots: false,
},
],
'vue/require-explicit-emits': 'off',
'vue/no-useless-v-bind': 'error',
'vue/no-required-prop-with-default': 'error',
'import/extensions': 'off',
'import/consistent-type-specifier-style': 'error',
'import/order': [
'error',
{
groups: ['type'],
'newlines-between': 'always',
},
],
'func-call-spacing': 'off',
'no-bitwise': [
'error',
{
allow: ['|'],
},
],
'no-console': [
'error',
{
allow: ['warn', 'error'],
},
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
'no-await-in-loop': 'off',
},
};
|
@ota-meshi & @kazupon any idea why the linters above are not working as expected? |
Tell us about your environment
v8.57.0
"eslint-plugin-vue": "^9.17.0"
"@intlify/eslint-plugin-vue-i18n": "^2.0.0"
v20.11.1
Please show your full configuration:
What did you do?
I just followed https://eslint-plugin-vue-i18n.intlify.dev/started.html and spent few days to figure out why. Tried parser option, different vite plugin for i18n, all did not work.
What did you expect to happen?
@intlify/vue-i18n/no-unused-keys
and@intlify/vue-i18n/key-format-style
should show errorsWhat actually happened?
It ONLY shows the raw text warning which is in
@intlify/vue-i18n/recommended
but not other rules, and also custom"@intlify/vue-i18n/no-raw-text": "error"
worked as well when I added inrules: { ... }
.Repository to reproduce this issue
https://github.com/daenamkim/eslint-plugin-vue-i18n-test
The text was updated successfully, but these errors were encountered: