Add common to the ESLint path and fix stats is undefined

This commit is contained in:
Samuel Elliott 2018-06-26 23:39:46 +01:00
parent ebe195f078
commit ea27259a67
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
2 changed files with 5 additions and 5 deletions

View File

@ -208,9 +208,9 @@ export class FileUtils {
* @return {Promise}
*/
static async fileExists(path) {
const stat = await this.stat(path);
const stats = await this.stat(path);
if (!stat.isFile()) throw {
if (!stats.isFile()) throw {
message: `Not a file: ${path}`,
stats
};
@ -222,9 +222,9 @@ export class FileUtils {
* @return {Promise}
*/
static async directoryExists(path) {
const stat = await this.stat(path);
const stats = await this.stat(path);
if (!stat.isDirectory()) throw {
if (!stats.isDirectory()) throw {
message: `Not a directory: ${path}`,
stats
};

View File

@ -72,7 +72,7 @@
"watch_csseditor": "npm run watch --prefix csseditor",
"build_installer": "npm run build --prefix installer",
"watch_installer": "npm run watch --prefix installer",
"lint": "eslint -f unix client/src core/src csseditor/src",
"lint": "eslint -f unix client/src core/src csseditor/src common",
"test": "npm run build && npm run lint",
"build_node-sass": "node scripts/build-node-sass.js",
"build_release": "npm run release --prefix client && npm run build --prefix core && npm run release --prefix csseditor",