New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add no-unknown-custom-properties
#6361
Comments
@jeddy3 Thanks for the proposal. I see it as very interesting, and it seems that this feature should be so valuable for many people. However, as we mentioned many times, how to resolve other files is stuff to be discussed well. It would be good if we could have a PoC that should be the basis of the discussion. By the way, is |
We may implement such a resolving mechanism as an experimental feature by borrowing code from the existing plugin. |
Oops, yes it is.
That sounds like a sensible approach. And I agree we can flag as experimental for now. I suggest we start by only supporting We'd want to author the Do you think there's value in something like a |
I agree with the idea.
Indeed, there may be a helpful case if |
I agree. I'll label this as ready to implement.
If anyone fancies contributing this rule, there are steps on how to add a new rule in the Developer guide. |
no-unknown-custom-properties
Regarding If a flat config is implemented, variable declarations could be automatically extracted from all files in the same "job", which then should be able to rely on user-provided |
Thanks @silverwind for connecting the tickets together, which helped get my attention. I'm totally on board with this, and will be happy to implement this here (this will be my first PR in this repository, so I'll be following the developer guide @jeddy3 mentioned). I have one question, though. Why not just implement it without secondary options for now, and POC the Once I hear back on what y'all think, I can start iterating on it. |
Sounds good. I welcome a pull request to implement the new rule without the secondary option. |
PR for initial implementation can be found here. |
Implementation was merged, so I assume we can close this one. Should we make a separate issue for the feature request for a |
Surely, leaving this issue title as-is may confuse people. Let's close this after we open a new follow-up issue. |
I just opened #6746. This can be closed. |
What is the problem you're trying to solve?
I'd like to disallow unknown custom properties. For example:
What solution would you like to see?
A new rule to catch this. It's currently available as a plugin but it meets our criteria to be a built-in rule.
Prior art for user-defined unknowns is no-unknown-animations.
Also, see this Twitter thread.
We'd need to address #4088 first, and work out how best to add imports & resolvers to configuration files. Is standardised
importForm
andresolver
secondary options on each of these types of rules the way to go?no-unknown-custom-properties
true
importForm
&resolver
?Unexpected unknown custom property
importForm
secondary option to specify more sources."Like no-unknown-animations, we won't turn the rule on in the recommended config and we'll want to update the recommended config to reflect this.
Any thoughts?
The text was updated successfully, but these errors were encountered: