eslint-plugin-vue-i18n
eslint-plugin-vue-i18n copied to clipboard
Ignore `null` values from template checks
What rule do you want to change? no-raw-text
Does this change cause the rule to produce more or fewer warnings? No.
How will the change be implemented? (New option, new default behavior, etc.)? New behavior, I think
Please provide some example code that this change will affect: https://stackblitz.com/edit/vite-vue2-hlw8rl?file=.eslintrc.js,src%2Fviews%2FAbout.vue,src%2Fviews%2FHome.vue
What does the rule currently do for this code? The rule does not ignore null value in template triggering error
What will the rule do after it's changed? The rule will omit the null values in the templates
Additional context
This has previously worked correctly in 0.11.1 version, in 1.0.0 it was already broken. I think it is correct to return null
value inside the template, especially when dealing with conditions. I've checked and undefined
is being ignored, I think same should also apply for null
?