Skip to content
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

Rule-set @intlify/vue-i18n/recommended to set no-raw-text with known html-attributes #472

Open
SimonSimCity opened this issue Feb 15, 2024 · 0 comments

Comments

@SimonSimCity
Copy link

SimonSimCity commented Feb 15, 2024

Tell us about your environment

  • ESLint version:
  • eslint-plugin-vue version:
  • eslint-plugin-vue-i18n version:
  • Node version:

The problem you want to solve.

The rule set @intlify/vue-i18n/recommended should by default not only warn for raw text, but also for attributes, visible as text, containing raw text. I discovered this when I realised that this set does not warn me when putting raw text into <input placeholder="raw-text" />. In my opinion, this is equally bad. Arguably, this would be annoying for someone overwriting this tag with a custom object, but this shouldn't be the majority - its neither recommended.

Your take on the correct solution to problem.

I could just write it in my eslint and call it a day, but there most likely also others running into the same trap.

Additional context

Here's a good list of arguments to start with: https://eslint-plugin-vue-i18n.intlify.dev/rules/no-raw-text.html#options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant