Change ESLint quote-props rule to as-needed

Also fixes all files flagged by the rule
This commit is contained in:
Aniruddh Agarwal
2016-04-15 23:48:02 +08:00
parent f492e58a5b
commit 09bf747cfc
8 changed files with 10 additions and 10 deletions

View File

@ -174,7 +174,7 @@
"one-var": 0, "one-var": 0,
"operator-assignment": 0, "operator-assignment": 0,
"padded-blocks": 0, "padded-blocks": 0,
"quote-props": 0, "quote-props": [2, "as-needed"],
"quotes": [ "quotes": [
2, 2,
"single", "single",

View File

@ -57,7 +57,7 @@ export default React.createClass({
const linkClassName = classNames(className, { const linkClassName = classNames(className, {
// 'active': active, we don't actually use the active class // 'active': active, we don't actually use the active class
// but it is used for a11y below // but it is used for a11y below
'disabled': disabled disabled: disabled
}); });
let linkProps = { let linkProps = {

View File

@ -48,7 +48,7 @@ const certTypes = {
}; };
function isValidURL(data) { function isValidURL(data) {
return isURL(data, { 'require_protocol': true }); return isURL(data, { require_protocol: true });
} }
const fields = [ const fields = [

View File

@ -1,5 +1,5 @@
const defaults = { const defaults = {
'string': { string: {
value: '', value: '',
valid: false, valid: false,
pristine: true, pristine: true,

View File

@ -44,7 +44,7 @@ module.exports = function(User) {
// username should not be in blacklist // username should not be in blacklist
User.validatesExclusionOf('username', { User.validatesExclusionOf('username', {
'in': blacklistedUsernames, in: blacklistedUsernames,
message: 'is taken' message: 'is taken'
}); });

View File

@ -274,7 +274,7 @@ export function postJSON$(url, body) {
responseType: 'json', responseType: 'json',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Accept': 'application/json' Accept: 'application/json'
} }
}) })
.map(({ response }) => response); .map(({ response }) => response);
@ -303,7 +303,7 @@ export function getJSON$(url) {
responseType: 'json', responseType: 'json',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Accept': 'application/json' Accept: 'application/json'
} }
}).map(({ response }) => response); }).map(({ response }) => response);
} }

View File

@ -85,7 +85,7 @@ function buildChallengeMap(userId, completedChallenges = [], User) {
}, {}) }, {})
.flatMap(challengeMap => { .flatMap(challengeMap => {
const updateData = { const updateData = {
'$set': { $set: {
challengeMap, challengeMap,
isChallengeMapMigrated: true isChallengeMapMigrated: true
} }

View File

@ -24,9 +24,9 @@ export function setProfileFromGithub(
}, },
{ {
id: githubId, id: githubId,
'avatar_url': picture, avatar_url: picture,
email: githubEmail, email: githubEmail,
'created_at': joinedGithubOn, created_at: joinedGithubOn,
blog: website, blog: website,
location, location,
name name