New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inline replacement of JSLint with JSHint, fixes #10692 #602

Closed
wants to merge 1 commit into
base: master
from
Jump to file or symbol
Failed to load files and symbols.
+4,317 −5,567
Diff settings

Always

Just for now

View
@@ -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
View
@@ -0,0 +1,32 @@
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,
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" );
}
View

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.