-
Notifications
You must be signed in to change notification settings - Fork 659
fix(rome_service): treat nursery rules differently #4511
Conversation
a3d1193
to
0313b47
Compare
✅ Deploy Preview for docs-rometools ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
cc @Vivalldi |
Parser conformance results on ubuntu-latestjs/262
jsx/babel
symbols/microsoft
ts/babel
ts/microsoft
|
Should we also update how we handle I am still not a fan of the current configuration shape: too much nesting and a bit complex for my taste. I already suggested this: I might prefer a flag to enable/disable the application of In my opinion, |
True. You might be onto something, although I don't understand yet how you would want to change the configuration. If you want , feel free to open a discussion with your proposal :) |
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.
I appreciate all the work you've done to get this in 🙇🏻
r#"const bannedType: Boolean = true; | ||
|
||
if (true) { | ||
const obj = {}; | ||
obj["useLiteralKey"]; | ||
} | ||
"#, | ||
); |
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.
A drawback to this test is it relies on one of these 3 rules to be in the nursery still
lint/nursery/noBannedTypes
lint/nursery/noConstantCondition
lint/nursery/useLiteralKeys
Are there any nursery rules that only exist at test time?
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.
Unfortunately no. That's the bad thing of this test :(
When we promote the rules, it's going to fail, probably. But I think it's okay.
Summary
Closes #4479
We treat nursery rules differently from the rest of the rules. We treated them differently only when using the top
recommended: true
but not whennursery: {}
was defined.This PR changes the code generation of the configuration to enable recommended rules only when
recommended: true
.Test Plan
Added the test case of the issue
Changelog
Documentation