Skip to content

Commit

Permalink
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
Show file tree
Hide file tree
Showing 12 changed files with 7,355 additions and 3,843 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
@@ -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
3 changes: 3 additions & 0 deletions .eslintignore
@@ -0,0 +1,3 @@
/node_modules
/libs
/demoassets
27 changes: 27 additions & 0 deletions .eslintrc
@@ -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
}
}
191 changes: 98 additions & 93 deletions chai-tests/main_spec.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions compareImages.js
@@ -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);
}
});
});
});
};

0 comments on commit 75b22ec

Please sign in to comment.