Complete list of default values for JSHint options?

*爱你&永不变心* 提交于 2019-12-04 23:37:46
Mikhail Chernykh

You can look on boolOptions, valOptions and invertedOptions objects directly in jshint sources:

https://github.com/jshint/jshint/blob/master/examples/.jshintrc

If you are confused with comments, you can refer to options section in jshint help:

http://jshint.com/docs/options/

J.D.

Actually, that page contains the list of default options, and that file mentioned in @netme's answer has no effect on JSHint's behavior. Quoting a JSHint project maintainer:

Actually, that file is just an example--it has no effect on JSHint's behavior. While it might match the current default behavior, there's no guarantee that it will continue to do so.

This is why the "options" documentation segments the options by the categories "enforcing" and "relaxing". Notice how all the "relaxing" options are about suppressing warnings--these are the constraints that JSHint imposes by default.

While this makes sense once you understand it, it is confusing to a lot of people (myself included), and may change in the future.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!