Fix(lint): correct lint errors

This commit is contained in:
Berkeley Martinez
2016-06-23 16:57:26 -07:00
parent b434ef6e43
commit cc0543d5df
11 changed files with 54 additions and 143 deletions

View File

@ -55,15 +55,15 @@
"complexity": 0,
"consistent-return": 2,
"curly": 2,
"default-case": 1,
"default-case": 2,
"dot-notation": 0,
"eqeqeq": 1,
"guard-for-in": 1,
"no-alert": 1,
"eqeqeq": 2,
"guard-for-in": 2,
"no-alert": 2,
"no-caller": 2,
"no-div-regex": 2,
"no-else-return": 0,
"no-eq-null": 1,
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
@ -73,8 +73,8 @@
"no-iterator": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-loop-func": 1,
"no-multi-spaces": 1,
"no-loop-func": 2,
"no-multi-spaces": 2,
"no-multi-str": 2,
"no-native-reassign": 2,
"no-new": 2,
@ -84,15 +84,15 @@
"no-octal-escape": 2,
"no-process-env": 0,
"no-proto": 2,
"no-redeclare": 1,
"no-redeclare": 2,
"no-return-assign": 2,
"no-script-url": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-unused-expressions": 2,
"no-void": 1,
"no-void": 2,
"no-warning-comments": [
1,
2,
{
"terms": [
"fixme"
@ -115,7 +115,7 @@
"no-shadow-restricted-names": 2,
"no-undef": 2,
"no-undef-init": 2,
"no-undefined": 1,
"no-undefined": 2,
"no-unused-vars": 2,
"no-use-before-define": 0,
@ -132,7 +132,7 @@
"1tbs",
{ "allowSingleLine": true }
],
"camelcase": 1,
"camelcase": 2,
"comma-spacing": [
2,
{
@ -158,11 +158,11 @@
"new-cap": 0,
"new-parens": 2,
"no-array-constructor": 2,
"no-inline-comments": 1,
"no-lonely-if": 1,
"no-inline-comments": 2,
"no-lonely-if": 2,
"no-mixed-spaces-and-tabs": 2,
"no-multiple-empty-lines": [
1,
2,
{ "max": 2 }
],
"no-nested-ternary": 2,
@ -170,7 +170,7 @@
"semi-spacing": [2, { "before": false, "after": true }],
"no-spaced-func": 2,
"no-ternary": 0,
"no-trailing-spaces": 1,
"no-trailing-spaces": 2,
"no-underscore-dangle": 0,
"one-var": 0,
"operator-assignment": 0,
@ -199,7 +199,7 @@
"space-in-parens": 0,
"space-infix-ops": 2,
"space-unary-ops": [
1,
2,
{
"words": true,
"nonwords": false
@ -210,7 +210,7 @@
"always",
{ "exceptions": ["-"] }
],
"wrap-regex": 1,
"wrap-regex": 2,
"max-depth": 0,
"max-len": [
@ -220,23 +220,23 @@
],
"max-params": 0,
"max-statements": 0,
"no-bitwise": 1,
"no-bitwise": 2,
"no-plusplus": 0,
"react/display-name": 1,
"react/jsx-boolean-value": [1, "always"],
"jsx-quotes": [1, "prefer-single"],
"react/jsx-no-undef": 1,
"react/jsx-sort-props": [1, { "ignoreCase": true }],
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/display-name": 2,
"react/jsx-boolean-value": [2, "always"],
"jsx-quotes": [2, "prefer-single"],
"react/jsx-no-undef": 2,
"react/jsx-sort-props": [2, { "ignoreCase": true }],
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/no-did-mount-set-state": 2,
"react/no-did-update-set-state": 2,
"react/no-multi-comp": [2, { "ignoreStateless": true } ],
"react/prop-types": 2,
"react/react-in-jsx-scope": 1,
"react/self-closing-comp": 1,
"react/wrap-multilines": 1,
"react/jsx-closing-bracket-location": [ 1, { "selfClosing": "line-aligned", "nonEmpty": "props-aligned" } ]
"react/react-in-jsx-scope": 2,
"react/self-closing-comp": 2,
"react/wrap-multilines": 2,
"react/jsx-closing-bracket-location": [ 2, { "selfClosing": "line-aligned", "nonEmpty": "props-aligned" } ]
}
}

View File

@ -1,51 +0,0 @@
import React from 'react';
import { Col, Row, Grid } from 'react-bootstrap';
import links from './links.json';
export default class extends React.Component {
static displayName = 'Footer';
renderLinks(mobile) {
return links.map(link => {
return (
<a
className={ link.className}
href={ link.href }
key={ link.content }
target={ link.target }>
{ this.renderContent(mobile, link.content) }
</a>
);
});
}
renderContent(mobile, content) {
if (mobile) {
return (
<span className='sr-only'>
content;
</span>
);
}
return content;
}
render() {
return (
<Grid className='fcc-footer'>
<Row>
<Col
className='hidden-xs hidden-sm'
xs={ 12 }>
{ this.renderLinks() }
</Col>
<Col
className='visible-xs visible-sm'
xs={ 12 }>
{ this.renderLinks(true) }
</Col>
</Row>
</Grid>
);
}
}

View File

@ -1 +0,0 @@
Currently not used

View File

@ -1 +0,0 @@
export default from './Footer.jsx';

View File

@ -1,44 +0,0 @@
[
{
"className": "ion-speakerphone",
"content": " Blog ",
"href": "http://medium.freecodecamp.com",
"target": "_blank"
},
{
"className": "ion-social-twitch-outline",
"content": " Twitch ",
"href": "http://www.twitch.tv/freecodecamp",
"target": "_blank"
},
{
"className": "ion-social-github",
"content": " GitHub ",
"href": "http://github.com/freecodecamp",
"target": "_blank"
},
{
"className": "ion-social-twitter",
"content": " Twitter ",
"href": "http://twitter.com/freecodecamp",
"target": "_blank"
},
{
"className": "ion-social-facebook",
"content": " Facebook ",
"href": "http://facebook.com/freecodecamp",
"target": "_blank"
},
{
"className": "ion-information-circled",
"content": " About ",
"href": "/learn-to-code",
"target": "_self"
},
{
"className": "ion-locked",
"content": " Privacy ",
"href": "/privacy'",
"target": "_self"
}
]

View File

@ -77,12 +77,14 @@ export default React.createClass({
return (
<li
{...props}
role='presentation'>
role='presentation'
>
<a
{ ...linkProps }
aria-controls={ ariaControls }
aria-selected={ active }
className={ linkClassName }>
className={ linkClassName }
>
{ children }
</a>
</li>

View File

@ -115,12 +115,14 @@ export class Editor extends PureComponent {
return (
<div
className='challenges-editor'
style={ style }>
style={ style }
>
<NoSSR>
<Codemirror
onChange={ this.handleChange }
options={ this.createOptions({ executeChallenge, mode, options }) }
value={ content } />
value={ content }
/>
</NoSSR>
</div>
);

View File

@ -11,11 +11,13 @@ export default class extends PureComponent {
<div className='hidden-xs hidden-md'>
<img
className='iphone-position iframe-scroll'
src='https://s3.amazonaws.com/freecodecamp/iphone6-frame.png' />
src='https://s3.amazonaws.com/freecodecamp/iphone6-frame.png'
/>
</div>
<iframe
className='iphone iframe-scroll'
id={ mainId } />
id={ mainId }
/>
<div className='spacer' />
</div>
);

View File

@ -80,10 +80,10 @@ export function _FrontEndForm({
<form
name='NewFrontEndProject'
onSubmit={
handleSubmit((value) => (
submitChallenge(value),
resetForm('NewFrontEndProject'))
)
handleSubmit((value) => {
submitChallenge(value);
resetForm('NewFrontEndProject');
})
}
>
{
@ -134,10 +134,10 @@ export function _BackEndForm({
<form
name='NewBackEndProject'
onSubmit={
handleSubmit((values) => (
submitChallenge(values),
resetForm('NewBackEndProject')
))
handleSubmit((values) => {
submitChallenge(values);
resetForm('NewBackEndProject');
})
}
>
{

View File

@ -16,7 +16,7 @@ var onConnect = function() {
app.start();
};
var timeoutHandler = setTimeout(function() {
timeoutHandler = setTimeout(function() {
var message =
'db did not connect after ' +
(Date.now() - startTime) +

View File

@ -1,4 +1,6 @@
export default [
'auth',
'services'
].reduce((throughs, route) => (throughs[route] = true, throughs), {});
].reduce((throughs, route) => {
throughs[route] = true; return throughs;
}, {});