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