fix remaining linting errors
This commit is contained in:
parent
617cffc869
commit
9efd9c624f
12 changed files with 13 additions and 27 deletions
|
@ -66,7 +66,6 @@ class Overlay extends React.Component {
|
|||
<div className="overlay">
|
||||
<div className="overlay__content">
|
||||
<section
|
||||
tabIndex="0"
|
||||
role="main"
|
||||
aria-label={ariaLabel}
|
||||
ref={(node) => { this.node = node; }}
|
||||
|
|
|
@ -18,7 +18,7 @@ class Console extends React.Component {
|
|||
});
|
||||
|
||||
return (
|
||||
<div className={consoleClass} role="main" tabIndex="0" title="console">
|
||||
<div className={consoleClass} role="main" title="console">
|
||||
<div className="preview-console__header">
|
||||
<h2 className="preview-console__header-title">Console</h2>
|
||||
<div className="preview-console__header-buttons">
|
||||
|
|
|
@ -307,7 +307,7 @@ class Editor extends React.Component {
|
|||
/>
|
||||
</div>
|
||||
</header>
|
||||
<div ref={(element) => { this.codemirrorContainer = element; }} className="editor-holder" tabIndex="0">
|
||||
<div ref={(element) => { this.codemirrorContainer = element; }} className="editor-holder" >
|
||||
</div>
|
||||
<EditorAccessibility
|
||||
lintMessages={this.props.lintMessages}
|
||||
|
|
|
@ -17,7 +17,7 @@ class EditorAccessibility extends React.Component {
|
|||
</li>));
|
||||
});
|
||||
} else {
|
||||
messages.push(<li tabIndex="0" key={0}> There are no lint messages </li>);
|
||||
messages.push(<li key={0}> There are no lint messages </li>);
|
||||
}
|
||||
return (
|
||||
<div className="editor-accessibility">
|
||||
|
|
|
@ -240,10 +240,6 @@ FileNode.propTypes = {
|
|||
};
|
||||
|
||||
FileNode.defaultProps = {
|
||||
id: '1',
|
||||
name: 'test',
|
||||
fileType: 'file',
|
||||
children: [],
|
||||
parentId: '0',
|
||||
isSelectedFile: false,
|
||||
isOptionsOpen: false,
|
||||
|
|
|
@ -32,7 +32,7 @@ class NewFileModal extends React.Component {
|
|||
'modal--reduced': !this.props.canUploadMedia
|
||||
});
|
||||
return (
|
||||
<section className={modalClass} tabIndex="0" ref={(element) => { this.modal = element; }}>
|
||||
<section className={modalClass} ref={(element) => { this.modal = element; }}>
|
||||
<div className="modal-content">
|
||||
<div className="modal__header">
|
||||
<h2 className="modal__title">Add File</h2>
|
||||
|
|
|
@ -13,7 +13,7 @@ class NewFolderModal extends React.Component {
|
|||
|
||||
render() {
|
||||
return (
|
||||
<section className="modal" ref={(element) => { this.newFolderModal = element; }} tabIndex="0">
|
||||
<section className="modal" ref={(element) => { this.newFolderModal = element; }} >
|
||||
<div className="modal-content-folder">
|
||||
<div className="modal__header">
|
||||
<h2 className="modal__title">Add Folder</h2>
|
||||
|
|
|
@ -23,7 +23,7 @@ class Preferences extends React.Component {
|
|||
|
||||
handleUpdateFont(event) {
|
||||
let value = parseInt(event.target.value, 10);
|
||||
if (isNaN(value)) {
|
||||
if (Number.isNaN(value)) {
|
||||
value = 16;
|
||||
}
|
||||
this.props.setFontSize(value);
|
||||
|
@ -31,7 +31,7 @@ class Preferences extends React.Component {
|
|||
|
||||
handleUpdateIndentation(event) {
|
||||
let value = parseInt(event.target.value, 10);
|
||||
if (isNaN(value)) {
|
||||
if (Number.isNaN(value)) {
|
||||
value = 2;
|
||||
}
|
||||
this.props.setIndentation(value);
|
||||
|
@ -51,7 +51,7 @@ class Preferences extends React.Component {
|
|||
const beep = new Audio(beepUrl);
|
||||
|
||||
return (
|
||||
<section className="preferences" tabIndex="0" title="preference-menu">
|
||||
<section className="preferences" title="preference-menu">
|
||||
<Helmet>
|
||||
<title>p5.js Web Editor | Preferences</title>
|
||||
</Helmet>
|
||||
|
@ -116,15 +116,13 @@ class Preferences extends React.Component {
|
|||
className="preference__value"
|
||||
aria-live="polite"
|
||||
aria-atomic="true"
|
||||
role="status"
|
||||
value={this.props.fontSize}
|
||||
onChange={this.handleUpdateFont}
|
||||
ref={(element) => { this.fontSizeInput = element; }}
|
||||
onClick={() => {
|
||||
this.fontSizeInput.select();
|
||||
}}
|
||||
>
|
||||
</input>
|
||||
/>
|
||||
<button
|
||||
className="preference__plus-button"
|
||||
onClick={() => this.props.setFontSize(this.props.fontSize + 2)}
|
||||
|
@ -148,15 +146,13 @@ class Preferences extends React.Component {
|
|||
className="preference__value"
|
||||
aria-live="polite"
|
||||
aria-atomic="true"
|
||||
role="status"
|
||||
value={this.props.indentationAmount}
|
||||
onChange={this.handleUpdateIndentation}
|
||||
ref={(element) => { this.indentationInput = element; }}
|
||||
onClick={() => {
|
||||
this.indentationInput.select();
|
||||
}}
|
||||
>
|
||||
</input>
|
||||
/>
|
||||
<button
|
||||
className="preference__plus-button"
|
||||
onClick={() => this.props.setIndentation(this.props.indentationAmount + 2)}
|
||||
|
@ -355,11 +351,7 @@ Preferences.propTypes = {
|
|||
theme: PropTypes.string.isRequired,
|
||||
serveSecure: PropTypes.bool.isRequired,
|
||||
setServeSecure: PropTypes.func.isRequired,
|
||||
setTheme: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
Preferences.defaultProps = {
|
||||
currentUser: undefined
|
||||
setTheme: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default Preferences;
|
||||
|
|
|
@ -332,7 +332,6 @@ class PreviewFrame extends React.Component {
|
|||
className="preview-frame"
|
||||
aria-label="sketch output"
|
||||
role="main"
|
||||
tabIndex="0"
|
||||
frameBorder="0"
|
||||
title="sketch output"
|
||||
ref={(element) => { this.iframeElement = element; }}
|
||||
|
|
|
@ -49,7 +49,7 @@ class Sidebar extends React.Component {
|
|||
});
|
||||
|
||||
return (
|
||||
<nav className={sidebarClass} title="file-navigation" role="navigation">
|
||||
<nav className={sidebarClass} title="file-navigation" >
|
||||
<div className="sidebar__header" onContextMenu={this.toggleProjectOptions}>
|
||||
<h3 className="sidebar__title">
|
||||
<span className="sidebar__folder-icon">
|
||||
|
|
|
@ -44,6 +44,7 @@ LoginForm.propTypes = {
|
|||
validateAndLoginUser: PropTypes.func.isRequired,
|
||||
submitting: PropTypes.bool,
|
||||
pristine: PropTypes.bool,
|
||||
invalid: PropTypes.bool,
|
||||
previousPath: PropTypes.string.isRequired
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ class EmailVerificationView extends React.Component {
|
|||
super(props);
|
||||
this.closeLoginPage = this.closeLoginPage.bind(this);
|
||||
this.gotoHomePage = this.gotoHomePage.bind(this);
|
||||
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
|
|
Loading…
Reference in a new issue