Skip to content

Add filename checks#121

Open
RoXuS wants to merge 2 commits into
43081j:masterfrom
RoXuS:addFilenameChecks
Open

Add filename checks#121
RoXuS wants to merge 2 commits into
43081j:masterfrom
RoXuS:addFilenameChecks

Conversation

@RoXuS

@RoXuS RoXuS commented Nov 16, 2021

Copy link
Copy Markdown

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.

@43081j

43081j commented Nov 20, 2021

Copy link
Copy Markdown
Owner

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.

@RoXuS

RoXuS commented Nov 21, 2021

Copy link
Copy Markdown
Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants