Skip to content

Commit

Permalink
Merge pull request #683 from peterblazejewicz/feature/eslint-changes
Browse files Browse the repository at this point in the history
🎨 Fix ESLint configuration and source errors
  • Loading branch information
sahat authored Jun 18, 2017
2 parents ec0cc4b + e224998 commit 3600e34
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 34 deletions.
2 changes: 0 additions & 2 deletions controllers/api.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const bluebird = require('bluebird');
const request = bluebird.promisifyAll(require('request'), { multiArgs: true });
const cheerio = require('cheerio');
Expand Down
2 changes: 1 addition & 1 deletion controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ exports.postReset = (req, res, next) => {
};
return transporter.sendMail(mailOptions)
.then(() => {
req.flash('success', { msg: 'Success! Your password has been changed.' });
req.flash('success', { msg: 'Success! Your password has been changed.' });
});
};

Expand Down
22 changes: 17 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"scripts": {
"start": "node app.js",
"test": "mocha --reporter spec",
"postinstall": "npm rebuild node-sass"
"postinstall": "npm rebuild node-sass",
"eslint": "eslint **/*.js"
},
"dependencies": {
"bcrypt-nodejs": "^0.0.3",
Expand Down Expand Up @@ -63,8 +64,9 @@
},
"devDependencies": {
"chai": "^3.5.0",
"eslint": "^3.9.1",
"eslint-config-airbnb-base": "^11.0.0",
"eslint": "^3.19.0",
"eslint-config-airbnb-base": "^11.1.3",
"eslint-plugin-chai-friendly": "^0.2.0",
"eslint-plugin-import": "^2.1.0",
"mocha": "^3.1.2",
"sinon": "^2.0.0",
Expand All @@ -80,7 +82,17 @@
"no-underscore-dangle": 0,
"no-shadow": 0,
"no-console": 0,
"no-plusplus": 0
}
"no-plusplus": 0,
"no-unused-expressions": 0,
"chai-friendly/no-unused-expressions": 2
},
"env": {
"jasmine": true,
"mocha": true,
"node": true
},
"plugins": [
"chai-friendly"
]
}
}
9 changes: 4 additions & 5 deletions test/models.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const mongoose = require('mongoose');
const {expect} = require('chai');
const { expect } = require('chai');
const sinon = require('sinon');
require('sinon-mongoose');

Expand All @@ -14,7 +13,7 @@ describe('User Model', () => {
.expects('save')
.yields(null);

user.save(function (err, result) {
user.save((err) => {
UserMock.verify();
UserMock.restore();
expect(err).to.be.null;
Expand Down Expand Up @@ -81,7 +80,7 @@ describe('User Model', () => {
userMock.restore();
expect(result.email).to.equal('[email protected]');
done();
})
});
});

it('should remove user by email', (done) => {
Expand All @@ -101,6 +100,6 @@ describe('User Model', () => {
expect(err).to.be.null;
expect(result.nRemoved).to.equal(1);
done();
})
});
});
});
60 changes: 39 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,12 @@ [email protected]:
version "0.2.10"
resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"

[email protected]:
[email protected], async@^2.0.1:
version "2.1.4"
resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4"
dependencies:
lodash "^4.14.0"

async@^2.0.1, async@^2.1.2:
version "2.1.5"
resolved "https://registry.yarnpkg.com/async/-/async-2.1.5.tgz#e587c68580994ac67fc56ff86d3ac56bdbe810bc"
dependencies:
lodash "^4.14.0"

asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
Expand Down Expand Up @@ -286,7 +280,7 @@ bluebird@^2.10.2:
version "2.11.0"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1"

bluebird@^3.0, bluebird@^3.0.6, bluebird@^3.1.5, bluebird@^3.4.0:
bluebird@^3.0, bluebird@^3.0.6, bluebird@^3.1.5, bluebird@^3.4.0, bluebird@^3.4.7:
version "3.5.0"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c"

Expand Down Expand Up @@ -570,7 +564,7 @@ [email protected]:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"

concat-stream@^1.4.6, concat-stream@^1.5.0:
concat-stream@^1.5.0, concat-stream@^1.5.2:
version "1.6.0"
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7"
dependencies:
Expand Down Expand Up @@ -765,13 +759,20 @@ diff@^3.1.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9"

[email protected], doctrine@^1.2.2:
[email protected]:
version "1.5.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa"
dependencies:
esutils "^2.0.2"
isarray "^1.0.0"

doctrine@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63"
dependencies:
esutils "^2.0.2"
isarray "^1.0.0"

doctypes@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/doctypes/-/doctypes-1.1.0.tgz#ea80b106a87538774e8a3a4a5afe293de489e0a9"
Expand Down Expand Up @@ -958,9 +959,9 @@ escope@^3.6.0:
esrecurse "^4.1.0"
estraverse "^4.1.1"

eslint-config-airbnb-base@^11.0.0:
version "11.1.1"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.1.1.tgz#61e9e89e4eb89f474f6913ac817be9fbb59063e0"
eslint-config-airbnb-base@^11.1.3:
version "11.1.3"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.1.3.tgz#0e8db71514fa36b977fbcf977c01edcf863e0cf0"

eslint-import-resolver-node@^0.2.0:
version "0.2.3"
Expand All @@ -977,6 +978,12 @@ eslint-module-utils@^2.0.0:
debug "2.2.0"
pkg-dir "^1.0.0"

eslint-plugin-chai-friendly@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-0.2.0.tgz#77666ea7a837ed11c5d307577e85287656f5d338"
dependencies:
requireindex "~1.1.0"

eslint-plugin-import@^2.1.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz#72ba306fad305d67c4816348a4699a4229ac8b4e"
Expand All @@ -992,17 +999,18 @@ eslint-plugin-import@^2.1.0:
minimatch "^3.0.3"
pkg-up "^1.0.0"

eslint@^3.9.1:
version "3.17.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.17.1.tgz#b80ae12d9c406d858406fccda627afce33ea10ea"
eslint@^3.19.0:
version "3.19.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc"
dependencies:
babel-code-frame "^6.16.0"
chalk "^1.1.3"
concat-stream "^1.4.6"
concat-stream "^1.5.2"
debug "^2.1.1"
doctrine "^1.2.2"
doctrine "^2.0.0"
escope "^3.6.0"
espree "^3.4.0"
esquery "^1.0.0"
estraverse "^4.2.0"
esutils "^2.0.2"
file-entry-cache "^2.0.0"
Expand Down Expand Up @@ -1042,14 +1050,20 @@ esprima@^3.1.1:
version "3.1.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"

esquery@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa"
dependencies:
estraverse "^4.0.0"

esrecurse@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220"
dependencies:
estraverse "~4.1.0"
object-assign "^4.0.1"

estraverse@^4.1.1, estraverse@^4.2.0:
estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"

Expand Down Expand Up @@ -1333,7 +1347,7 @@ github@^9.2.0:
mime "^1.2.11"
netrc "^0.1.4"

[email protected]:
[email protected], glob@^7.0.0, glob@^7.0.3:
version "7.0.5"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95"
dependencies:
Expand All @@ -1344,7 +1358,7 @@ [email protected]:
once "^1.3.0"
path-is-absolute "^1.0.0"

glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@~7.1.1:
glob@^7.0.5, glob@~7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
dependencies:
Expand Down Expand Up @@ -2922,6 +2936,10 @@ require_optional@~1.0.0:
resolve-from "^2.0.0"
semver "^5.1.0"

requireindex@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.1.0.tgz#e5404b81557ef75db6e49c5a72004893fe03e162"

resolve-from@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"
Expand Down

0 comments on commit 3600e34

Please sign in to comment.