When a rule is defined to be fixable, fixable
key should be specified which can have code
or whitespace
values:
fixable
(string) is either "code" or "whitespace" if the--fix
option on the mand line automatically fixes problems reported by the rule
What are the differences between these values and what whitespace
is for specifically?
When a rule is defined to be fixable, fixable
key should be specified which can have code
or whitespace
values:
fixable
(string) is either "code" or "whitespace" if the--fix
option on the mand line automatically fixes problems reported by the rule
What are the differences between these values and what whitespace
is for specifically?
1 Answer
Reset to default 8Currently ESLint doesn't use those values for anything (other then existence of any value under fixable
property). This is meant for future use. For example, at some point ESLint might provide a way to only fix whitespace rules, or only code.
Currently "whitespace" should be used for any rule that deal with spacing (indentation, spacing between properties, etc.), everything else is marked as "code".