Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added linting
- Loading branch information
james.cryer
committed
Mar 28, 2018
1 parent
df348cd
commit 75b22ec
Showing
12 changed files
with
7,355 additions
and
3,843 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[{.travis.yml}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/node_modules | ||
/libs | ||
/demoassets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"extends": [ | ||
"eslint-config-es5", | ||
"plugin:prettier/recommended" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 2017, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": true, | ||
"tabWidth": "4" | ||
} | ||
], | ||
"no-console": "off", | ||
"no-use-before-define": ["warn", { "functions": false, "classes": false, "variables": true }], | ||
"func-names": ["warn", "as-needed"] | ||
|
||
}, | ||
"env": { | ||
"amd": true, | ||
"es6": true | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
var resemble = require('./resemble'); | ||
const resemble = require("./resemble"); | ||
|
||
module.exports = function(image1, image2, options) { | ||
return new Promise(function(resolve, reject) { | ||
resemble.compare(image1, image2, options, function(err, data) { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(data); | ||
} | ||
module.exports = function compareImages(image1, image2, options) { | ||
return new Promise((resolve, reject) => { | ||
resemble.compare(image1, image2, options, (err, data) => { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(data); | ||
} | ||
}); | ||
}); | ||
}); | ||
}; |
Oops, something went wrong.