Skip to content

Commit 09bf747

Browse files
author
Aniruddh Agarwal
committed
Change ESLint quote-props rule to as-needed
Also fixes all files flagged by the rule
1 parent f492e58 commit 09bf747

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
"one-var": 0,
175175
"operator-assignment": 0,
176176
"padded-blocks": 0,
177-
"quote-props": 0,
177+
"quote-props": [2, "as-needed"],
178178
"quotes": [
179179
2,
180180
"single",

common/app/components/Nav/NavItem.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default React.createClass({
5757
const linkClassName = classNames(className, {
5858
// 'active': active, we don't actually use the active class
5959
// but it is used for a11y below
60-
'disabled': disabled
60+
disabled: disabled
6161
});
6262

6363
let linkProps = {

common/app/routes/Jobs/components/NewJob.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const certTypes = {
4848
};
4949

5050
function isValidURL(data) {
51-
return isURL(data, { 'require_protocol': true });
51+
return isURL(data, { require_protocol: true });
5252
}
5353

5454
const fields = [

common/app/routes/Jobs/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const defaults = {
2-
'string': {
2+
string: {
33
value: '',
44
valid: false,
55
pristine: true,

common/models/user.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module.exports = function(User) {
4444

4545
// username should not be in blacklist
4646
User.validatesExclusionOf('username', {
47-
'in': blacklistedUsernames,
47+
in: blacklistedUsernames,
4848
message: 'is taken'
4949
});
5050

common/utils/ajax-stream.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export function postJSON$(url, body) {
274274
responseType: 'json',
275275
headers: {
276276
'Content-Type': 'application/json',
277-
'Accept': 'application/json'
277+
Accept: 'application/json'
278278
}
279279
})
280280
.map(({ response }) => response);
@@ -303,7 +303,7 @@ export function getJSON$(url) {
303303
responseType: 'json',
304304
headers: {
305305
'Content-Type': 'application/json',
306-
'Accept': 'application/json'
306+
Accept: 'application/json'
307307
}
308308
}).map(({ response }) => response);
309309
}

server/middlewares/migrate-completed-challenges.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function buildChallengeMap(userId, completedChallenges = [], User) {
8585
}, {})
8686
.flatMap(challengeMap => {
8787
const updateData = {
88-
'$set': {
88+
$set: {
8989
challengeMap,
9090
isChallengeMapMigrated: true
9191
}

server/utils/auth.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ export function setProfileFromGithub(
2424
},
2525
{
2626
id: githubId,
27-
'avatar_url': picture,
27+
avatar_url: picture,
2828
email: githubEmail,
29-
'created_at': joinedGithubOn,
29+
created_at: joinedGithubOn,
3030
blog: website,
3131
location,
3232
name

0 commit comments

Comments
 (0)