-
-
Notifications
You must be signed in to change notification settings - Fork 793
refactor: share lint rule options #5543
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
Conversation
c6265e4 to
2a0ef25
Compare
2a0ef25 to
1e3833a
Compare
|
I committed some changes to improve Note: I had to remove your last merge commit because it was removing features committed on main leading to many errors. |
|
I performed the merge with main. |
22deec1 to
bc7de20
Compare
4053581 to
c6731fd
Compare
CodSpeed Performance ReportMerging #5543 will not alter performanceComparing Summary
|
|
What do you think of my solution? |
I am unsure how this could work once we promote the GraphQL Also, some options make sense only in a given language. Should we then ignore them in the rules of a different language? |
Yes, they will inherit the same options, it's up to the rule to use them. There shouldn't be a runtime error.
That's a valid concern that we haven't tackled yet. Imho, if an option makes sense only for a given language, then the rule should have a very specific name that implies that it's used only in JavaScript files. The options could also be divided into different languages, e.g. {
"useNamingConvention": {
"javascript": {} // current options
"graphql": {} // options for graphql
}
} |
|
Regardless, as for now, I think we should rename the lint rule inside graphql. |
|
arendjr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Co-authored-by: Victorien Elvinger <[email protected]> Co-authored-by: Conaclos <[email protected]> Co-authored-by: dyc3 <[email protected]> Co-authored-by: arendjr <[email protected]>
Summary
Fix #6018
This PR refactors the rule options, which are now generated and shared among rules.
*_syntaxcrates anymoreTest Plan
No changes to the users, the CI should stay green.
I will update the contribution guide after we merge this one, which is already big enough