Introduces .jshintignore
This commit is contained in:
parent
fe093a37ad
commit
fcebe57d8e
17
.jshintignore
Normal file
17
.jshintignore
Normal file
@ -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
20
make.js
@ -1267,31 +1267,13 @@ target.lint = function() {
|
|||||||
echo();
|
echo();
|
||||||
echo('### Linting JS files');
|
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');
|
var jshintPath = path.normalize('./node_modules/.bin/jshint');
|
||||||
if (!test('-f', jshintPath)) {
|
if (!test('-f', jshintPath)) {
|
||||||
echo('jshint is not installed -- installing...');
|
echo('jshint is not installed -- installing...');
|
||||||
exec('npm install jshint@2.4.x'); // TODO read version from package.json
|
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) {
|
if (exitCode === 0) {
|
||||||
echo('files checked, no errors found');
|
echo('files checked, no errors found');
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
"typogr": "0.5.x"
|
"typogr": "0.5.x"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node make lint"
|
"test": "node ./node_modules/.bin/jshint ."
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
Loading…
Reference in New Issue
Block a user