Skip to content
Permalink
Browse files

Fix #10692. JSLint is dead! Long live JSHint!

Still needs this sizzle PR: jquery/sizzle#82
  • Loading branch information...
mikesherov authored and dmethvin committed Dec 9, 2011
1 parent d6500cc commit 98386cfd775fdfa7837ccbec173b04f1e6d57896
Showing with 4,323 additions and 5,570 deletions.
  1. +8 −6 Makefile
  2. +35 −0 build/jshint-check.js
  3. +0 −36 build/jslint-check.js
  4. +4,256 −0 build/lib/jshint.js
  5. +0 −5,504 build/lib/jslint.js
  6. +12 −12 src/ajax.js
  7. +5 −5 src/ajax/xhr.js
  8. +3 −3 src/event.js
  9. +1 −1 src/offset.js
  10. +3 −3 src/traversing.js
@@ -46,7 +46,7 @@ DATE=$(shell git log -1 --pretty=format:%ad)

all: update_submodules core

core: jquery min lint size
core: jquery min hint size
@@echo "jQuery build complete."

${DIST_DIR}:
@@ -67,12 +67,14 @@ ${SRC_DIR}/selector.js: ${SIZZLE_DIR}/sizzle.js
@@echo "Building selector code from Sizzle"
@@sed '/EXPOSE/r src/sizzle-jquery.js' ${SIZZLE_DIR}/sizzle.js | grep -v window.Sizzle > ${SRC_DIR}/selector.js

lint: jquery
lint: hint

hint: jquery
@@if test ! -z ${JS_ENGINE}; then \
echo "Checking jQuery against JSLint..."; \
${JS_ENGINE} build/jslint-check.js; \
echo "Checking jQuery against JSHint..."; \
${JS_ENGINE} build/jshint-check.js; \
else \
echo "You must have NodeJS installed in order to test jQuery against JSLint."; \
echo "You must have NodeJS installed in order to test jQuery against JSHint."; \
fi

size: jquery min
@@ -134,4 +136,4 @@ pull_submodules:
pull: pull_submodules
@@git pull ${REMOTE} ${BRANCH}

.PHONY: all jquery lint min clean distclean update_submodules pull_submodules pull core
.PHONY: all jquery lint hint min clean distclean update_submodules pull_submodules pull core

This comment has been minimized.

Copy link
@gnarf

gnarf Dec 9, 2011

Member

lint is an alias to hint then you run hint i'm pretty sure the lint here is not needed

@@ -0,0 +1,35 @@
var JSHINT = require("./lib/jshint").JSHINT,
print = require("sys").print,
src = require("fs").readFileSync("dist/jquery.js", "utf8");

JSHINT(src, {
evil: true,
undef: false,
browser: true,
wsh: true,
eqnull: true,
expr: true,
curly: true,
eqeq: true,
trailing: true,
predef: [
"define",
"DOMParser"
],
maxerr: 100
});

var e = JSHINT.errors, found = e.length, i = 0, w;

for ( ; i < e.length; i++ ) {
w = e[i];

print( "\n" + w.evidence + "\n" );
print( " Problem at line " + w.line + " character " + w.character + ": " + w.reason );
}

if ( found > 0 ) {
print( "\n" + found + " Error(s) found.\n" );
} else {
print( "JSHint check passed.\n" );
}

This file was deleted.

0 comments on commit 98386cf

Please sign in to comment.
You can’t perform that action at this time.