Commits on Nov 13, 2012
  1. Lexer refactoring.

    This patch transforms lexer from module level functions that
    operate with module-level variables to a normal JavaScript
    object with its own state and so on. This means that we don't
    need to explicitly reset variables between executions since
    `new Lexer(...)` guarantees that the state will be new on every
    Also Lexer is an EventEmitter so we don't need to pass warningAt,
    errorAt and quit functions. We just need to subscribe to the
    warning, error and fatal Lexer events and call appropriate
    functions from our handlers (see jshint.js for an example).
    valueof committed Nov 13, 2012
  2. Moved JSHint options into a separate file.

    This way I can use them with jshint-i and other non-make.js tools.
    valueof committed Nov 13, 2012
  3. First pass at lexer refactoring.

    This commit will break your tree. It features a half-completed
    lexer refactoring. See followup commits for more info.
    valueof committed Nov 5, 2012
Commits on Nov 11, 2012
  1. JSHint logo

    valueof committed Nov 11, 2012
Commits on Nov 3, 2012
  1. Extract regular expressions, lexer and some state variables.

    This is my first attempt on making JSHint more refactorable. I started
    with removing the giant closure (browserify will add something like
    that anyway) and moving some parts into separate modules:
     1. Lexer (lex) is now in lex.js
     2. Long regular expressions (tx, ax, etc.) are now in reg.js with
        better names.
     3. Lexer shares some state variables with other globals. I moved
        those into a state.js file.
    The code is somewhat hacky right now but it opens a door towards easier
    refactoring for me.
    Surprised I didn't get grey hair while debugging all corner cases.
    valueof committed Nov 3, 2012
  2. Renamed variable 's' to 'input'.

    Because single-letter variables that span over multiple scopes can go to
    valueof committed Nov 3, 2012
  3. Merge branch 'code'

    valueof committed Nov 3, 2012
  4. Converted all messages to codes.

    This commit also makes warning() function to accept only codes. You
    can't use it with plain text anymore. All messages are in
    shared/messages.js. Some warnings were reworded so I updated tests for
    This commit also sunsets one of the options: onecase.
    valueof committed Oct 31, 2012
Commits on Oct 31, 2012
  1. Extracted all warnings and error messages into a separate files.

    I decided to go with a structure I used in Next: every message has a
    code and a description. In code, we will be referencing messages only
    by their codes.
    valueof committed Oct 31, 2012
  2. Don't assume 'strict' for 'node' environments.

    We don't need to warn people about using "use strict" outside
    of a function scope in Node environments but my previous naive
    implementation was achieving this by simply turning 'globalstrict'
    on. This doesn't really work because it 'globalstrict' implies
    'strict' which  is not always wanted. This patch fixes it.
    Fixes GH-721.
    valueof committed Oct 31, 2012
  3. Fixed lint and test failures.

    I merged an innocent-looking pull request and it failed tests.
    For some reason, Travis/GitHub integration signaled green while
    in reality at least one test was rightfully broken.
    Oh well, computers.
    valueof committed Oct 31, 2012
  4. Merge pull request #720 from bkw/lintMakeJS

    Lint make.js with all other files.
    valueof committed Oct 31, 2012
  5. Merge pull request #724 from bkw/npmFix2

    This patch makes it possible to require JSHint as an NPM module.
    valueof committed Oct 31, 2012
  6. Merge pull request #723 from ericpromislow/master

    This patch simply changes a warning message to a more correct one.
    Fixes GH-719.
    valueof committed Oct 31, 2012
Commits on Oct 30, 2012
  1. whitespace: use tabs in package.json

    bkw committed Oct 28, 2012
  2. Make [.../...] warning error that unescaped '/'s are allowed in [...]…

    … but should be escaped
    ericpromislow committed Oct 30, 2012
  3. let make.js lint itself

    bkw committed Oct 30, 2012
Commits on Oct 29, 2012
  1. Moved docs from jshint.js to README and re-aligned the code.

    We don't need docs in three places (site, source and README) so I
    moved them from source to README. I also realigned broken spaces
    in options declarations and removed `/*members ... */` block because
    it adds little value and is super annoying to maintain.
    valueof committed Oct 29, 2012
Commits on Oct 27, 2012
  1. Added Element to the browser globals list.

    Fixes GH-707.
    valueof committed Oct 27, 2012
  2. Minor changes: made make.js executable and updated CONTRIBUTING.

    You can now use make.js without explicitly specifying node:
    	./make.js test
    I removed the note about hard-tabs and jshint.js because it was no
    longer true.
    valueof committed Oct 27, 2012
  3. Add 'scope' property to critical errors.

    Critical errors (those produced by the 'quit' function) show up
    in as well as any other errors and warnings and
    should have the same format.
    This patch adds a missing property 'scope' to such errors. It's
    always set to '(main)' since errors are unrecoverable.
    Fixes GH-714.
    valueof committed Oct 27, 2012
Commits on Oct 13, 2012
  1. Convert all spaces to tabs.

    This commit converts all spaces to tabs. This means that if you're
    reading this message while using 'git blame' feel free to skip to
    the previous commit to find the real author.
    Sorry about that.
    valueof committed Oct 13, 2012
  2. Fixed stylisting warnings in JSHint wrappers.

    Since I made all files to pass the same JSHint settings some
    slipped through the cracks and started failing. How embarassing.
    This patch fixes that.
    valueof committed Oct 13, 2012
  3. WSH: Convert numeric parameters to numbers

    For some reason, WSH wrapper was passing numeric parameters as
    strings and JSHint couldn't understand them. This patch converts
    to numbers all parameters that can be converted.
    Fixes GH-671.
    valueof committed Oct 13, 2012
  4. Added an FAQ section to the README.

    As any other open source project we have a number of questions that
    folks keep asking over and over. This FAQ will contain answers to
    such questions starting with the "How can I turn off 'mixed tabs and
    spaces' warning?".
    valueof committed Oct 13, 2012
Commits on Oct 12, 2012
  1. Copied CLI documentation from node-jshint

    Since we're merging all repos together I need to copy some docs so that we don't lose them forever.
    valueof committed Oct 12, 2012
Commits on Oct 9, 2012
  1. Two spaces instead of tabs in .travis.yml.

    Travis-CI thinks that we're a ruby project for some reason. Hopefully
    this will fix it.
    valueof committed Oct 9, 2012