fix a few linting errors
This commit is contained in:
parent
c90dac55b7
commit
5057a901fe
5 changed files with 25 additions and 11 deletions
13
.eslintrc
13
.eslintrc
|
@ -40,7 +40,18 @@
|
||||||
}],
|
}],
|
||||||
"class-methods-use-this": 0,
|
"class-methods-use-this": 0,
|
||||||
"react/jsx-no-bind": [2, {"allowBind": true, "allowArrowFunctions": true}],
|
"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": [
|
"plugins": [
|
||||||
"react", "jsx-a11y", "import"
|
"react", "jsx-a11y", "import"
|
||||||
|
|
|
@ -108,7 +108,7 @@ class Nav extends React.PureComponent {
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
return (
|
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">
|
<ul className="nav__items-left" title="project-menu">
|
||||||
<li className="nav__item-logo">
|
<li className="nav__item-logo">
|
||||||
<InlineSVG src={logoUrl} alt="p5.js logo" />
|
<InlineSVG src={logoUrl} alt="p5.js logo" />
|
||||||
|
|
|
@ -3,9 +3,13 @@ import { createDevTools } from 'redux-devtools';
|
||||||
import LogMonitor from 'redux-devtools-log-monitor';
|
import LogMonitor from 'redux-devtools-log-monitor';
|
||||||
import DockMonitor from 'redux-devtools-dock-monitor';
|
import DockMonitor from 'redux-devtools-dock-monitor';
|
||||||
|
|
||||||
export default createDevTools(<DockMonitor
|
const devTools = (
|
||||||
|
<DockMonitor
|
||||||
toggleVisibilityKey="ctrl-h"
|
toggleVisibilityKey="ctrl-h"
|
||||||
changePositionKey="ctrl-w"
|
changePositionKey="ctrl-w"
|
||||||
>
|
>
|
||||||
<LogMonitor />
|
<LogMonitor />
|
||||||
</DockMonitor>);
|
</DockMonitor>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default createDevTools(devTools);
|
||||||
|
|
|
@ -39,8 +39,7 @@ class Console extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
<div ref={(element) => { this.consoleMessages = element; }} className="preview-console__messages">
|
<div ref={(element) => { this.consoleMessages = element; }} className="preview-console__messages">
|
||||||
{this.props.consoleEvents.map((consoleEvent) => {
|
{this.props.consoleEvents.map((consoleEvent) => {
|
||||||
const args = consoleEvent.arguments;
|
const { args, method } = consoleEvent;
|
||||||
const method = consoleEvent.method;
|
|
||||||
if (Object.keys(args).length === 0) {
|
if (Object.keys(args).length === 0) {
|
||||||
return (
|
return (
|
||||||
<div key={consoleEvent.id} className="preview-console__undefined">
|
<div key={consoleEvent.id} className="preview-console__undefined">
|
||||||
|
|
Loading…
Reference in a new issue