-
Notifications
You must be signed in to change notification settings - Fork 1
One rule to set them all #5
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Type
Fields
Give feedbackNo fields configured for issues without a type.
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" }] } }