New rule: `no-unused-key`
I want to propose an extension to https://github.com/edvardchen/eslint-plugin-i18next/issues/106:
If the user is not allowed to use dynamic keys, the codebase knows all the keys in use, and can let me know of the remaining ones.
Of course, such a rule would be quite heavy to compute and should be limited to just the file containing the translations.
Here's a package implementing it for vue: https://eslint-plugin-vue-i18n.intlify.dev/rules/no-unused-keys.html
0 条评论