Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Replace JSLint with JSHint"

This reverts commit c241569.
  • Loading branch information...
commit 2b0f9dc78dca6a7cc1a2d6b0c9a55aafe7936702 1 parent 6481e38
@ixti ixti authored
View
2  .jshintignore
@@ -1,4 +1,4 @@
-.git/
doc/
node_modules/
tmp/
+.git/
View
72 .jshintrc
@@ -1,71 +1,5 @@
{
- // Enforcing Options /////////////////////////////////////////////////////////
-
- "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
- "curly" : true, // Require {} for every new block or scope.
- "eqeqeq" : true, // Require triple equals i.e. `===`.
- "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`.
- "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
- "latedef" : true, // Prohibit hariable use before definition.
- "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
- "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
- "noempty" : true, // Prohibit use of empty blocks.
- "nonew" : true, // Prohibit use of constructors for side-effects.
- "plusplus" : true, // Prohibit use of `++` & `--`.
- "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions.
- "undef" : true, // Require all non-global variables be declared before they are used.
- "strict" : true, // Require `use strict` pragma in every file.
- "trailing" : true, // Prohibit trailing whitespaces.
-
- // Relaxing Options //////////////////////////////////////////////////////////
-
- "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
- "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
- "debug" : false, // Allow debugger statements e.g. browser breakpoints.
- "eqnull" : false, // Tolerate use of `== null`.
- "es5" : true, // Allow ECMAScript 5 syntax.
- "esnext" : false, // Allow ES.next specific features such as const and let
- "evil" : false, // Tolerate use of `eval`.
- "expr" : false, // Tolerate `ExpressionStatement` as Programs.
- "funcscope" : false, // Tolerate declaring variables inside of control structures while accessing them later
- "globalstrict" : true, // Allow global "use strict" (also enables 'strict').
- "iterator" : false, // Allow usage of __iterator__ property.
- "lastsemic" : false, // Tolerate semicolon omited for the last statement.
- "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
- "loopfunc" : false, // Allow functions to be defined within loops.
- "multistr" : false, // Tolerate multi-line strings.
- "onecase" : false, // Tolerate swithes with only one case.
- "proto" : false, // Allow usage of __proto__ property.
- "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
- "scripturl" : true, // Tolerate script-targeted URLs.
- "smarttabs" : false, // Allow mixed tabs and spaces when the latter are used for alignmnent only.
- "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
- "supernew" : true, // Tolerate `new function () { ... };` and `new Object;`.
-
- // Environments //////////////////////////////////////////////////////////////
-
- "browser" : false, // Defines globals exposed by modern browsers
- "couch" : false, // Defines globals exposed by CouchDB
- "devel" : false, // Allow developments statements e.g. `console.log();`.
- "dojo" : false, // Defines globals exposed by the Dojo Toolkit
- "jquery" : false, // Defines globals exposed by the jQuery
- "mootools" : false, // Defines globals exposed by the MooTools
- "node" : true, // Defines globals exposed when running under Node.JS
- "nonstandard" : false, // Defines non-standard but widely adopted globals such as escape and unescape
- "prototypejs" : false, // Defines globals exposed by the Prototype
- "rhino" : false, // Defines globals exposed when running under Rhino
- "wsh" : false, // Defines globals exposed when running under WSH
-
- // Legacy ////////////////////////////////////////////////////////////////////
-
- "nomen" : false, // Prohibit use of initial or trailing underbars in names.
- "onevar" : false, // Allow only one `var` statement per function.
- "passfail" : false, // Stop on first error.
- "white" : false, // Check against strict whitespace and indentation rules.
-
- // Undocumented //////////////////////////////////////////////////////////////
-
- "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
- "maxerr" : 100, // Maximum error before stopping.
- "indent" : 2 // Specify indentation spacing
+ "node": true,
+ "globalstrict": true,
+ "es5": true
}
View
13 Makefile
@@ -10,14 +10,19 @@ CURR_HEAD := $(firstword $(shell git show-ref --hash HEAD | cut --bytes=-6) mas
GITHUB_NAME := nodeca/babelfish
SRC_URL_FMT := https://github.com/${GITHUB_NAME}/blob/${CURR_HEAD}/{file}\#L{line}
+JS_FILES := $(shell find ./bin ./lib ./test -type f -name '*.js' -print)
+
lint:
- if test ! `which jshint` ; then \
- echo "You need 'jshint' installed in order to run lint." >&2 ; \
+ @if test ! `which jslint` ; then \
+ echo "You need 'jslint' installed in order to run lint." >&2 ; \
echo " $ make dev-deps" >&2 ; \
exit 128 ; \
fi
- jshint . --show-non-errors
+ # (node) -> Node.JS compatibility mode
+ # (indent) -> indentation level (2 spaces)
+ # (nomen) -> tolerate underscores in identifiers (e.g. `var _val = 1`)
+ jslint --node --nomen --indent=2 ./index.js ${JS_FILES}
test: lint
@if test ! `which vows` ; then \
@@ -66,4 +71,4 @@ todo:
.PHONY: test doc dev-deps gh-pages todo
-.SILENT: lint test doc todo
+.SILENT: test doc todo
View
2  package.json
@@ -22,7 +22,7 @@
},
"devDependencies" : {
"vows" : "~ 0.6.0",
- "jshint" : "~ 0.5.5"
+ "jslint" : "https://github.com/reid/node-jslint/tarball/6131ebf5713274871b89735105e3286131804771"
},
"engines" : { "node": "> 0.4.11" }
}
View
2  test/parser-test.js
@@ -15,7 +15,7 @@ function testParsedNodes(definitions) {
Object.getOwnPropertyNames(definitions).forEach(function (str) {
tests[str] = function () {
- var expected, result;
+ var expected, result, msg;
expected = definitions[str];
result = Parser.parse(str);

3 comments on commit 2b0f9dc

@dvv

\o/

@ixti
Collaborator

only because of npm works really strange on travis vm

@dvv

in fact i mislooked that this is revert. so /o\

Please sign in to comment.
Something went wrong with that request. Please try again.