Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
janvennemann committed Apr 30, 2019
1 parent 08de229 commit b330082
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@
"ecmaVersion": 2017,
"sourceType": "module"
}
},
{
"files": [ "cli/lib/tasks/*.js" ],
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
}
}
]
}
10 changes: 5 additions & 5 deletions cli/lib/tasks/process-js-task.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const appc = require('node-appc');
const { IncrementalFileTask } = require('appc-tasks');
const crypto = require('crypto');
Expand Down Expand Up @@ -148,7 +146,7 @@ class ProcessJsTask extends IncrementalFileTask {

this.transformAndCopy(source, from, to).then(() => {
this.data.contentHashes[from] = currentHash;
done();
return done();
}).catch(e => {
// if we have a nicely formatted pointer to syntax error from babel, print it!
if (e.codeFrame) {
Expand All @@ -168,7 +166,7 @@ class ProcessJsTask extends IncrementalFileTask {
symbols: []
};

compileJsFileHook(r, from, to, done)
compileJsFileHook(r, from, to, done);
}));
}

Expand Down Expand Up @@ -220,7 +218,7 @@ class ProcessJsTask extends IncrementalFileTask {
*/
async transformAndCopy(source, from, to) {
// DO NOT TRANSPILE CODE inside SDK's common folder. It's already transpiled!
const isFileFromCommonFolder = from.startsWith(this.sdkCommonFolder)
const isFileFromCommonFolder = from.startsWith(this.sdkCommonFolder);
const transpile = isFileFromCommonFolder ? false : this.defaultAnalyzeOptions.transpile;
const minify = isFileFromCommonFolder ? false : this.defaultAnalyzeOptions.minify;
const analyzeOptions = Object.assign({}, this.defaultAnalyzeOptions, {
Expand Down Expand Up @@ -360,6 +358,8 @@ class ProcessJsTask extends IncrementalFileTask {

/**
* Saves current task data for reuse on next run.
*
* @return {Promise}
*/
async saveTaskData() {
return fs.writeJson(this.dataFilePath, this.data);
Expand Down

0 comments on commit b330082

Please sign in to comment.