Browse Source

Merge pull request #4602 from yurydelendik/jshintignore

Introduces .jshintignore
Brendan Dahl 11 years ago
parent
commit
e1c5d130ea
  1. 17
      .jshintignore
  2. 20
      make.js
  3. 2
      package.json

17
.jshintignore

@ -0,0 +1,17 @@ @@ -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
*~/

20
make.js

@ -1267,31 +1267,13 @@ target.lint = function() { @@ -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');
}

2
package.json

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
"typogr": "0.5.x"
},
"scripts": {
"test": "node make lint"
"test": "node ./node_modules/.bin/jshint ."
},
"repository": {
"type": "git",

Loading…
Cancel
Save