mirror of https://github.com/zulip/zulip.git
check-all: Use more fs / path functions
(imported from commit f2b2970efa9b93068f835cd70ca3e3cc7ec22c38)
This commit is contained in:
parent
15a99f6be2
commit
3816ca6dfb
|
@ -73,9 +73,10 @@ var exceptions = {
|
||||||
|
|
||||||
|
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var JSLINT = require(__dirname + '/jslint').JSLINT;
|
var path = require('path');
|
||||||
|
var JSLINT = require(path.join(__dirname, 'jslint')).JSLINT;
|
||||||
|
|
||||||
var js_dir = __dirname + '/../../zephyr/static/js/';
|
var js_dir = fs.realpathSync(path.join(__dirname, '../../zephyr/static/js'));
|
||||||
|
|
||||||
var exit_code = 0;
|
var exit_code = 0;
|
||||||
|
|
||||||
|
@ -83,7 +84,7 @@ fs.readdirSync(js_dir).forEach(function (filename) {
|
||||||
if (filename.slice('-3') !== '.js')
|
if (filename.slice('-3') !== '.js')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var contents = fs.readFileSync(js_dir + filename, 'utf8');
|
var contents = fs.readFileSync(path.join(js_dir, filename), 'utf8');
|
||||||
var messages = [];
|
var messages = [];
|
||||||
|
|
||||||
if (!JSLINT(contents, jslint_options)) {
|
if (!JSLINT(contents, jslint_options)) {
|
||||||
|
|
Loading…
Reference in New Issue