2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-19 03:25:44 +00:00
cheat.sheets/sheets/jshint
2020-11-18 07:48:19 +01:00

24 lines
861 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# jshint
# JSHint is a fork of JSLint. The reasons for the fork is basically that
# the author disagrees in some points withDouglas Crockford
# on JavaScript coding style.
#
# If you're looking for a very high standard for yourself or team,
# use JSLint (by Doug Crockford).
# If you want to be a bit more flexible, or have some old pros on your team
# that don't buy into JSLint's opinions, try JSHint.
# to install jshint
sudo npm install jshint -g
# lint all the JavaScript files in the current directory:
find . -name '*.js' -print0 | xargs -0 jshint
# lint all the JavaScript files in a targeted directory:
find ./public/javascripts/ -name '*.js' -print0 | xargs -0 jshint
# Parameter-less options passed to jslint are all set to true by default,
# if you want to set it false, just specify 'false' after the option
jshint --bitwise false hello.js