Skip to content

Commit

Permalink
Change ESLint quote-props rule to as-needed
Browse files Browse the repository at this point in the history
Also fixes all files flagged by the rule
  • Loading branch information
Aniruddh Agarwal committed Apr 15, 2016
1 parent f492e58 commit 09bf747
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
"one-var": 0,
"operator-assignment": 0,
"padded-blocks": 0,
"quote-props": 0,
"quote-props": [2, "as-needed"],
"quotes": [
2,
"single",
Expand Down
2 changes: 1 addition & 1 deletion common/app/components/Nav/NavItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion common/app/routes/Jobs/components/NewJob.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const certTypes = {
};

function isValidURL(data) {
return isURL(data, { 'require_protocol': true });
return isURL(data, { require_protocol: true });
}

const fields = [
Expand Down
2 changes: 1 addition & 1 deletion common/app/routes/Jobs/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const defaults = {
'string': {
string: {
value: '',
valid: false,
pristine: true,
Expand Down
2 changes: 1 addition & 1 deletion common/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = function(User) {

// username should not be in blacklist
User.validatesExclusionOf('username', {
'in': blacklistedUsernames,
in: blacklistedUsernames,
message: 'is taken'
});

Expand Down
4 changes: 2 additions & 2 deletions common/utils/ajax-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -303,7 +303,7 @@ export function getJSON$(url) {
responseType: 'json',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
Accept: 'application/json'
}
}).map(({ response }) => response);
}
2 changes: 1 addition & 1 deletion server/middlewares/migrate-completed-challenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function buildChallengeMap(userId, completedChallenges = [], User) {
}, {})
.flatMap(challengeMap => {
const updateData = {
'$set': {
$set: {
challengeMap,
isChallengeMapMigrated: true
}
Expand Down
4 changes: 2 additions & 2 deletions server/utils/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 09bf747

Please sign in to comment.