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
{{ message }}
Repository navigation
π organizedImports options should error on unknown predefined groupsΒ #10185
organizedImports uses a dedicated syntax for predefined groups: all predefined groups are enclosed by two colons. For example :NODE:.
The option deserializer doesn't currently check if a name between two colons is actually a valid predefine group.
Thus, this doesn't catch misspelling.
For example, the following configuration is considered valid:
{
"options": {
"groups": [":NOD:", ":Bun:"]
}
}
This task is about to error on unknown predefined groups.
For example using :NOD: or :NoDe: must emit a misconfiguration error.
We must also error on use of :BLANK_LINE: in a source matcher like in the following config:
No. I just mean that a user could create a config with unknown predefined groups that just got ignored. And if we start erroring on them, then they have to remove these useless (invalid) groups.
I guess we could create a migration that removes them automatically.
Activity
ematipico commentedon May 1, 2026
Why would that be a breaking change? That seems more like a bug
Conaclos commentedon May 1, 2026
Because it could make a previously valid user config invalid?
I am fine making it a bug, I just thought since the start it was a breaking change.
ematipico commentedon May 1, 2026
Have you identified a valid case? The initial issue doesn't say much on that regard
Conaclos commentedon May 1, 2026
Have you identified a valid case?
No. I just mean that a user could create a config with unknown predefined groups that just got ignored. And if we start erroring on them, then they have to remove these useless (invalid) groups.
I guess we could create a migration that removes them automatically.
Do you think it is an acceptable change?
ematipico commentedon May 1, 2026
I think it is an acceptable, it's an invalid configuration that we didn't catch, so it's a bug on our side.
We could add a warning in the changeset that this could be a potential breaking change because it spots invalid configuration.
If it might feel you better, we could land it as a
minor. As per migration I don't have strong feelings, it's definitely more helpful.Update dependency @biomejs/biome to v2.4.15 (#12)
Update dependency @biomejs/biome to v2.4.15 (#3)