reid/node-jslint — pull request #102 by jacksonrayhamilton (2014-10-26 06:55:48+00:00)
Title: Refactor everything

I have refactored most of this project's code, linting it, stripping-out complexity, and improving lackluster features. I imagine you may find some of my changes objectionable, though there are plenty which I believe will greatly improve the quality of this package should they find their way back into `reid:master`.

Summary of changes:

- Linted project, resorting very cautiously to `/*jslint` directives. `jslint bin/*.js lib/*.js test/*.js` now reports no errors.
- Made sync methods async. The option merger used `fs.readFileSync`; now it uses `fs.readFile`. `glob.sync` was being used; now it's just `glob`.
- Simplified option-merging in some aspects, improved it in others. There is now only *one* file that contains jslint options: `.jslintrc`. Additionally, `.jslintrc` files are no longer contingent on the user's current working directory. Rather, their significance is their location relative to linted files. The closer a `.jslintrc` file is to a file being linted, the higher precedence it has over `.jslintrc` files up the directory tree. This allows you to create a set of options that apply to only 1 directory while still using rules defined "higher up" in the project. See `README.md` for an example.
- Refactored tests / unexposed numerous exported properties. It seems that many modules exposed what should have been encapsulated functions in order to boost test coverage. I have managed to indirectly cover many of these methods by instead testing public APIs which invoke them.
- Removed `--edition` option. `node-jslint` now uses the latest JSLint. Supporting old versions adds unnecessary extra complexity to the project. Once the project makes its `1.0.0` debut and begins abiding by semver, bugfixes to JSLint can merit patch bumps, API improvements to JSLint can merit minor bumps, and breaking changes can merit major bumps. Version bumps can be made as liberally as is necessary to stay current with the latest JSLint trends. Users who want an old version may simply remain at `^x.x.x`.
- Code style unification minutia.