diff --git a/.eslintrc b/.eslintrc index 5e924f47ed..216a7b76a9 100644 --- a/.eslintrc +++ b/.eslintrc @@ -174,7 +174,7 @@ "one-var": 0, "operator-assignment": 0, "padded-blocks": 0, - "quote-props": 0, + "quote-props": [2, "as-needed"], "quotes": [ 2, "single", diff --git a/common/app/components/Nav/NavItem.jsx b/common/app/components/Nav/NavItem.jsx index 4e4d084dcc..465cabf7df 100644 --- a/common/app/components/Nav/NavItem.jsx +++ b/common/app/components/Nav/NavItem.jsx @@ -57,7 +57,7 @@ export default React.createClass({ const linkClassName = classNames(className, { // 'active': active, we don't actually use the active class // but it is used for a11y below - 'disabled': disabled + disabled: disabled }); let linkProps = { diff --git a/common/app/routes/Jobs/components/NewJob.jsx b/common/app/routes/Jobs/components/NewJob.jsx index 5cb6c990ac..3645d8c1e9 100644 --- a/common/app/routes/Jobs/components/NewJob.jsx +++ b/common/app/routes/Jobs/components/NewJob.jsx @@ -48,7 +48,7 @@ const certTypes = { }; function isValidURL(data) { - return isURL(data, { 'require_protocol': true }); + return isURL(data, { require_protocol: true }); } const fields = [ diff --git a/common/app/routes/Jobs/utils.js b/common/app/routes/Jobs/utils.js index f2fc37d593..6a8f1705b7 100644 --- a/common/app/routes/Jobs/utils.js +++ b/common/app/routes/Jobs/utils.js @@ -1,5 +1,5 @@ const defaults = { - 'string': { + string: { value: '', valid: false, pristine: true, diff --git a/common/models/user.js b/common/models/user.js index 4c48f5e3ab..3f99fbba51 100644 --- a/common/models/user.js +++ b/common/models/user.js @@ -44,7 +44,7 @@ module.exports = function(User) { // username should not be in blacklist User.validatesExclusionOf('username', { - 'in': blacklistedUsernames, + in: blacklistedUsernames, message: 'is taken' }); diff --git a/common/utils/ajax-stream.js b/common/utils/ajax-stream.js index 1a95784a53..9ad5034b11 100644 --- a/common/utils/ajax-stream.js +++ b/common/utils/ajax-stream.js @@ -274,7 +274,7 @@ export function postJSON$(url, body) { responseType: 'json', headers: { 'Content-Type': 'application/json', - 'Accept': 'application/json' + Accept: 'application/json' } }) .map(({ response }) => response); @@ -303,7 +303,7 @@ export function getJSON$(url) { responseType: 'json', headers: { 'Content-Type': 'application/json', - 'Accept': 'application/json' + Accept: 'application/json' } }).map(({ response }) => response); } diff --git a/server/middlewares/migrate-completed-challenges.js b/server/middlewares/migrate-completed-challenges.js index 9085b98f23..fa2952ddd1 100644 --- a/server/middlewares/migrate-completed-challenges.js +++ b/server/middlewares/migrate-completed-challenges.js @@ -85,7 +85,7 @@ function buildChallengeMap(userId, completedChallenges = [], User) { }, {}) .flatMap(challengeMap => { const updateData = { - '$set': { + $set: { challengeMap, isChallengeMapMigrated: true } diff --git a/server/utils/auth.js b/server/utils/auth.js index 2dd6a4b90d..52afd45861 100644 --- a/server/utils/auth.js +++ b/server/utils/auth.js @@ -24,9 +24,9 @@ export function setProfileFromGithub( }, { id: githubId, - 'avatar_url': picture, + avatar_url: picture, email: githubEmail, - 'created_at': joinedGithubOn, + created_at: joinedGithubOn, blog: website, location, name