The original idea was to have only one rule with a lot of options.
The default is the first option and the specific decorators could override them.
For example:
{
"rules": {
"sort-decorators/sort-decorators": ["error", { "direction": "asc" }, { "classes": { "direction": "desc" } }]
}
}
However, 5 smaller rules have been created to make it easier to overwrite them in the overrides section, without re-writing all:
{
"overrides": [{ "files": ["src/*.ts"], "rules": { "sort-decorators/sort-on-classes": "error" } }],
"rules": {
"sort-decorators/sort-on-classes": "warn"
}
}
Should it go back to a 1 rule plugin ?
Or add a 6th rule that is the default for all ? (Is it possible in ESLint ?)
Example:
{
"rules": {
"sort-decorators/sort-decorators": ["error", { "direction": "asc" }],
"sort-decorators/sort-on-classes": ["warn", { "direction": "desc" }]
}
}
The original idea was to have only one rule with a lot of options.
The default is the first option and the specific decorators could override them.
For example:
{ "rules": { "sort-decorators/sort-decorators": ["error", { "direction": "asc" }, { "classes": { "direction": "desc" } }] } }However, 5 smaller rules have been created to make it easier to overwrite them in the
overridessection, without re-writing all:{ "overrides": [{ "files": ["src/*.ts"], "rules": { "sort-decorators/sort-on-classes": "error" } }], "rules": { "sort-decorators/sort-on-classes": "warn" } }Should it go back to a 1 rule plugin ?
Or add a 6th rule that is the default for all ? (Is it possible in ESLint ?)
Example:
{ "rules": { "sort-decorators/sort-decorators": ["error", { "direction": "asc" }], "sort-decorators/sort-on-classes": ["warn", { "direction": "desc" }] } }