diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 0000000000000..a9f83b3b7d3b2 --- /dev/null +++ b/.jshintignore @@ -0,0 +1,17 @@ +build/ +l10n/ +docs/ +node_modules/ +examples/ +external/webL10n/ +external/shelljs/ +external/jpgjs/ +external/jasmine/ +external/cmapscompress/ +external/importL10n/ +test/tmp/ +test/features/ +test/resources/ +test/mozcentral/ +test/font/*_spec.js +*~/ diff --git a/make.js b/make.js index 2a0be66f7dafa..bc2fad2943ced 100644 --- a/make.js +++ b/make.js @@ -1267,31 +1267,13 @@ target.lint = function() { echo(); echo('### Linting JS files'); - var LINT_FILES = ['make.js', - 'external/builder/', - 'external/crlfchecker/', - 'src/', - 'web/', - 'test/downloadutils.js', - 'test/driver.js', - 'test/test.js', - 'test/testutils.js', - 'test/webbrowser.js', - 'test/webserver.js', - 'test/font/fontutils.js', - 'test/font/ttxdriver.js', - 'test/unit/', - 'extensions/firefox/', - 'extensions/chromium/' - ]; - var jshintPath = path.normalize('./node_modules/.bin/jshint'); if (!test('-f', jshintPath)) { echo('jshint is not installed -- installing...'); exec('npm install jshint@2.4.x'); // TODO read version from package.json } - var exitCode = exec('"' + jshintPath + '" ' + LINT_FILES.join(' ')).code; + var exitCode = exec('"' + jshintPath + '" .').code; if (exitCode === 0) { echo('files checked, no errors found'); } diff --git a/package.json b/package.json index 30c9a4fbe2e63..b50285e13400f 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "typogr": "0.5.x" }, "scripts": { - "test": "node make lint" + "test": "node ./node_modules/.bin/jshint ." }, "repository": { "type": "git",