JavaScript code analyser for side-effecting statements
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
samples
src
test/spec
.gitattributes
.gitignore
Gruntfile.js
LICENSE
README.md
package.json

README.md

PureHint

Analyses JavaScript code for side-effecting statements.

Online demo

####Usage

node purehint.js [option1] [option2] ... <file1> <file2> ...

Where option can be one of:

  • --allow-var - ignores var declarations. Const declarations are preferred to vars
  • --disallow-prototype - emits errors for assignments to prototypes
  • --disallow-exports - emits errors for assignments to the exports object
  • --disallow-window - emits errors for assignments to the window object
  • --disallow-array - emits errors for every method call that might be an array mutator (push, pop, sort, etc). These warnings are disabled by default as they are highly speculative
  • --stats-only - suppresses the full log and only counts the number of errors