Open
Description
PartialInstanceVariable
is great for partials, but I'd like to forbid instance variables in all templates.
The PartialInstanceVariable
linter implementation has this guard to restrict it to partials:
So a linter simply without this restriction would work for my case.
The only thing between me and a PR is how to structure the configuration. Some options I came up with:
- Create a new
InstanceVariable
linter that works for all templates and document the fact that if you enable this andPartialInstanceVariable
, you may get double warnings - Create a new
NonPartialInstanceVariable
linter that only works on non-partials to avoid double linting if someone has both enabled - Add configuration to
PartialInstanceVariable
of the sortall_templates: true
to make it work for all templates - Deprecate
PartialInstanceVariable
and create aInstanceVariable
linter with apartials_only: true
configuration
I'm inclined toward option 1 for simplicity, but I'm very open to whatever so I can add this linter 😄
Metadata
Assignees
Labels
No labels