You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What rule do you want to change?
attribute-hyphenation
Does this change cause the rule to produce more or fewer warnings?
Fewer
How will the change be implemented? (New option, new default behavior, etc.)?
An option to ignore tags based on their names. Either by adding a new option ignoreTags which accept a regexp
constoptions={ignoreTags: /^ctag/// ignore html-tags starting with "ctag", such as <ctag-input> or <ctag-hey>.}
...Or maybe change the current ignore option to accept a function with a signature like this function (tagName: string, propName: string): boolean
// ignore tags starting with "ctag" or attributes starting with "cprop-"constoptions={ignore: (tagName: string,propName: string)=>/^ctag/.test(tagName)||/^cprop-/.test(tagName)}
Please provide some example code that this change will affect:
What does the rule currently do for this code?
If you have attribute-hyphenation activated with always, the fooBar attribute above will be an error.
What will the rule do after it's changed?
This rule wont be applied to this tag.
Additional context
When using custom components with Lit, you are free to use whatever casing you want on the attributes. And thats fine as long as you are in control of the custom components and can set the attribute names yourself. But when including shared custom components with different linting rules that you have no control of, it would be great to ignore them from being linted.
The text was updated successfully, but these errors were encountered:
jschill
changed the title
attribute-hyphenation: Ignore tag name pattern
attribute-hyphenation: Ignore tag name pattern or function
Jan 23, 2024
What rule do you want to change?
attribute-hyphenation
Does this change cause the rule to produce more or fewer warnings?
Fewer
How will the change be implemented? (New option, new default behavior, etc.)?
An option to ignore tags based on their names. Either by adding a new option
ignoreTags
which accept a regexp...Or maybe change the current
ignore
option to accept a function with a signature like thisfunction (tagName: string, propName: string): boolean
Please provide some example code that this change will affect:
What does the rule currently do for this code?
If you have attribute-hyphenation activated with always, the fooBar attribute above will be an error.
What will the rule do after it's changed?
This rule wont be applied to this tag.
Additional context
When using custom components with Lit, you are free to use whatever casing you want on the attributes. And thats fine as long as you are in control of the custom components and can set the attribute names yourself. But when including shared custom components with different linting rules that you have no control of, it would be great to ignore them from being linted.
The text was updated successfully, but these errors were encountered: