fix a few linting errors

This commit is contained in:
Cassie Tarakajian 2018-05-04 17:43:31 -07:00
parent c90dac55b7
commit 5057a901fe
5 changed files with 25 additions and 11 deletions

View file

@ -40,7 +40,18 @@
}],
"class-methods-use-this": 0,
"react/jsx-no-bind": [2, {"allowBind": true, "allowArrowFunctions": true}],
"no-return-assign": [2, "except-parens"]
"no-return-assign": [2, "except-parens"],
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": [
"Link"
],
"specialLink": [
"to"
]
}
]
},
"plugins": [
"react", "jsx-a11y", "import"

View file

@ -108,7 +108,7 @@ class Nav extends React.PureComponent {
})
};
return (
<nav className="nav" role="navigation" title="main-navigation" ref={(node) => { this.node = node; }}>
<nav className="nav" title="main-navigation" ref={(node) => { this.node = node; }}>
<ul className="nav__items-left" title="project-menu">
<li className="nav__item-logo">
<InlineSVG src={logoUrl} alt="p5.js logo" />

View file

@ -3,9 +3,13 @@ import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
export default createDevTools(<DockMonitor
toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-w"
>
<LogMonitor />
</DockMonitor>);
const devTools = (
<DockMonitor
toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-w"
>
<LogMonitor />
</DockMonitor>
);
export default createDevTools(devTools);

View file

@ -49,7 +49,7 @@ class AssetList extends React.Component {
<td>{prettyBytes(asset.size)}</td>
<td><Link to={asset.url} target="_blank">View</Link></td>
<td><Link to={`/${this.props.username}/sketches/${asset.sketchId}`}>{asset.sketchName}</Link></td>
</tr>))}
</tr>))}
</tbody>
</table>}
</div>

View file

@ -39,8 +39,7 @@ class Console extends React.Component {
</div>
<div ref={(element) => { this.consoleMessages = element; }} className="preview-console__messages">
{this.props.consoleEvents.map((consoleEvent) => {
const args = consoleEvent.arguments;
const method = consoleEvent.method;
const { args, method } = consoleEvent;
if (Object.keys(args).length === 0) {
return (
<div key={consoleEvent.id} className="preview-console__undefined">