Closed dananaprey closed 2 weeks ago
Similar to #55, I'm not sure if this is generic enough to be included in the plugin. Empty string values are completely valid and I'm not sure represent an error in most cases.
@eslint/eslint-team what do you think?
Agreed. From the broad perspective of JSON & common JSON uses, there's nothing inherently wrong with an empty string. Same with any arbitrary nullish/empty value. That's a library-specific thing. I'm -1 on building any into @eslint/json
so early into project, if ever.
I agree that empty string values are generally valid so this doesn't seem generic enough to be included in the plugin.
Thanks for answers!
Rule details
Detect empty string values in JSON
What type of rule is this?
Suggests an alternate way of doing something
Example code
Real life example:
I have a JSON file for application localization
I want to prevent empty translations values to avoid missing text in the application
This rule should help
Participation
Additional comments
Similar rules, if necessary, can be made for values {}, [], null
I am also willing to submit a pull requests to implement this rules