-
Notifications
You must be signed in to change notification settings - Fork 660
🐛 Enabling one nursery rule causes all other nursery rules to be enabled #4479
Comments
@Vivalldi could you please share your configuration? |
@ematipico, this config and file is the basic replication {
"$schema": "https://docs.rome.tools/schemas/12.1.0/schema.json",
"organizeImports": {
"enabled": false
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"nursery": {
"noAccumulatingSpread": "error"
}
}
}
} test file showing 3 non-enabled nursery rules const bannedType: Boolean = true;
if (true) {
const obj = {};
obj["useLiteralKey"];
} Here's a repo as well - https://github.com/vivalldi/rome-4479 |
As a temporary workaround, you can add {
"$schema": "https://docs.rome.tools/schemas/12.1.0/schema.json",
"organizeImports": {
"enabled": false
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"nursery": {
+ "recommended": false,
"noAccumulatingSpread": "error"
}
}
}
} |
I have an idea of the issue! It should be easy to fix |
Looks like this is back in Updated replication repo to 12.1.2 and was getting the same issue. Workaround of |
With the code you provided, what's the expected behaviour? Zero diagnostics? |
Correct, zero diagnostics. Below are two truth tables based on how I expect recommendations to behave. The only case that differs between them is the 4th case. Feel free to let me know if this doesn't line up with the project's expectations Normal groupsAll groups respect
Nursery groupThe nursery group never respects
|
Perfect, I believe I know what's the source of the issue |
Environment information
What happened?
lint/nursery/noAccumulatingSpread
rome check .
lint/nursery/useExhaustiveDependencies
&useLiteralKeys
began to be checked as well.Diagnostics
I tried setting
recommended
to false but the same issue was presentExpected result
Only enabled nursery rules should be checked
Code of Conduct
The text was updated successfully, but these errors were encountered: