Description
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:
{
"options": {
"groups": [{ "source": ["anything", ":BLANK_LINE:"] }]
}
}
This is a breaking change.
Description
organizedImportsuses 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:{ "options": { "groups": [{ "source": ["anything", ":BLANK_LINE:"] }] } }This is a breaking change.