Add common to the ESLint path and fix stats is undefined
This commit is contained in:
parent
ebe195f078
commit
ea27259a67
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue