1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-10-12 03:54:24 +02:00

eslint fixes

This commit is contained in:
Kushagra Gour
2018-06-22 20:19:19 +05:30
parent 2b8e773e03
commit 0eec8bec91
10 changed files with 156 additions and 97 deletions

View File

@@ -559,7 +559,8 @@ export default class ContentWrap extends Component {
setTimeout(() => {
this.setPreviewContent(true);
}, 1500);
function checkWindow() {
var intervalID = window.setInterval(checkWindow => {
if (this.detachedWindow && this.detachedWindow.closed) {
clearInterval(intervalID);
document.body.classList.remove('is-detached-mode');
@@ -569,8 +570,7 @@ export default class ContentWrap extends Component {
// getting reflected while detached window was open)
this.setPreviewContent(true);
}
}
var intervalID = window.setInterval(checkWindow.bind(this), 500);
}, 500);
}
onMessageFromConsole() {

View File

@@ -1,7 +0,0 @@
import { h, Component } from 'preact';
export default class Header extends Component {
render() {
return <header class={style.header} />;
}
}

View File

@@ -23,11 +23,19 @@ export function Notifications(props) {
</li>
<li>
🚀 Popular libraries list updated. Thanks
<a href="https://github.com/diomed" target="_blank">
<a
href="https://github.com/diomed"
target="_blank"
rel="noopener noreferrer"
>
@diomed
</a>{' '}
&{' '}
<a href="https://github.com/leninalbertolp" target="_blank">
<a
href="https://github.com/leninalbertolp"
target="_blank"
rel="noopener noreferrer"
>
@leninalbertolp
</a>
</li>
@@ -40,10 +48,18 @@ export function Notifications(props) {
<li>
<strong>🚀 Announcement</strong>: Hi! I am Kushagra Gour (creator of
Web Maker) and I have launched a
<a href="https://patreon.com/kushagra" target="_blank">
<a
href="https://patreon.com/kushagra"
target="_blank"
rel="noopener noreferrer"
>
Patreon campaign
</a>. If you love Web Maker, consider pledging to
<a href="https://patreon.com/kushagra" target="_blank">
<a
href="https://patreon.com/kushagra"
target="_blank"
rel="noopener noreferrer"
>
support me
</a>{' '}
:)
@@ -52,6 +68,7 @@ export function Notifications(props) {
<a
href="https://github.com/chinchang/web-maker/issues"
target="_blank"
rel="noopener noreferrer"
>
Suggest features or report bugs.
</a>
@@ -63,6 +80,7 @@ export function Notifications(props) {
<a
href="https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews"
target="_blank"
rel="noopener noreferrer"
class="btn"
>
Please rate Web Maker <span class="star" />
@@ -70,7 +88,7 @@ export function Notifications(props) {
<a
href="http://twitter.com/share?url=https://webmakerapp.com/&text=Web Maker - A blazing fast %26 offline web playground! via @webmakerApp&related=webmakerApp&hashtags=web,editor,chrome,extension"
target="_blank"
target="_blank"
rel="noopener noreferrer"
class="btn"
>
Share it

View File

@@ -33,16 +33,22 @@ export class SplitPane extends Component {
options.onDragStart = this.props.onDragStart;
}
/* eslint-disable new-cap */
this.splitInstance = Split(
this.props.children.map(node => '#' + node.attributes.id),
options
);
/* eslint-enable new-cap */
if (this.props.onSplit) {
this.props.onSplit(this.splitInstance);
}
}
render() {
/* eslint-disable no-unused-vars */
const { children, ...props } = this.props;
/* eslint-enable no-unused-vars */
return <div {...props}>{this.props.children}</div>;
}
}

View File

@@ -11,7 +11,10 @@ class Clickable extends Component {
this.props.onClick(e);
}
render() {
/* eslint-disable no-unused-vars */
const { onClick, Tag, ...props } = this.props;
/* eslint-enable no-unused-vars */
return <Tag onClick={this.handleClick.bind(this)} {...props} />;
}
}