eslint-plugin-lit
eslint-plugin-lit copied to clipboard
Add filename checks
Hey!
Thx for this plugin.
I suggest these 2 rules to check if the filename matches with lit class name and if the filename matches with element name.
i feel like if we do adopt these rules, they should probably exist as one to keep them well scoped to lit.
a rule such as "file name matches class name" could exist in another plugin, unrelated to lit, and cover what the file-name-matches-element-class
rule does and more.
so maybe we have a naming convention rule which uses the element name if one is found, and the class name otherwise.
@stramel if you get time can i get your thoughts on this too. i dont want the rules to end up being too generic, enough that they're not really lit-specific.
I'm agree, theses rules should be one, I split them to allow more flexibility to the user.
So, I can regroup the rules to check class + element name + filename, if you prefer.
Maybe class should be optional in the rules? (element + filename OR class/element/filename).