最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ESLint "code" vs "whitespace" values for fixable - Stack Overflow

programmeradmin0浏览0评论

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?

Share Improve this question asked Jul 9, 2016 at 4:18 alecxealecxe 475k127 gold badges1.1k silver badges1.2k bronze badges
Add a ment  | 

1 Answer 1

Reset to default 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".

发布评论

评论列表(0)

  1. 暂无评论