ESLint "code" vs "whitespace" values for fixable
Asked Answered
C

1

5

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 command line automatically fixes problems reported by the rule

What are the differences between these values and what whitespace is for specifically?

Caldwell answered 9/7, 2016 at 4:18 Comment(0)
S
8

Currently 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".

Scarlett answered 9/7, 2016 at 21:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.