Open Ericlm opened 4 months ago
That's formatter (e.g. Prettier) territory rather than linter territory. But we currently do have many formatting rules, so this could be considered. @ota-meshi what do you think?
In my opinion, it would be useful to provide formatting rules in an ESLint plugin, since current formatters, like Prettier, don't accept options in most cases.
That would be great! My team replaced Prettier with stylistic, that's why I've seen that. It would also be great to have a plugin so that a rule activated with ESLint stylistic would automatically be applied to the template part of .vue
files.
And a plugin could reduce the number of "extension rules" that are not so easy to discover in the documentation 😅
Maybe it could be integrated into eslint-stylistic ? There are already support for ts,js,jsx ; maybe would it be possible to have those rule into this package ? That would also allow the rules to be automatically "inherited" from the stylistic config.
Please describe what the rule should do: The rule would remove trailing and leading spaces from within directives and dynamic attributes. It could also remove trailing/leading spaces from static attributes maybe?
What category should the rule belong to? [X] Enforces code style (layout) [ ] Warns about a potential error (problem) [ ] Suggests an alternate way of doing something (suggestion) [ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about: