Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/empty/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import './style';
import { Component } from 'preact';

// eslint-disable-next-line
export default class App extends Component {
render() {
return (
Expand Down
1 change: 1 addition & 0 deletions examples/full/src/components/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Profile from '../routes/profile';
// import Profile from 'async!../routes/profile';

export default class App extends Component {

/** Gets fired when the route changes.
* @param {Object} event "change" event from [preact-router](http://git.io/preact-router)
* @param {string} event.url The newly routed URL
Expand Down
1 change: 1 addition & 0 deletions examples/full/src/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { h, Component } from 'preact';
import { Link } from 'preact-router/match';
import style from './style';

// eslint-disable-next-line
Copy link
Member Author

@reznord reznord Aug 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this line because eslint throws warnings for this.

As of now we are using eslint-config-synacor. Once we shift to eslint-preact-preset, we can remove these comments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reznord is that in the plans? I could help with that! Wanted to learn how to make eslint plugins and configs

Sent from my Bq Aquaris M5 using FastHub

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was talking to @developit regarding this, he said he will soon add one. But I took care of the comment in another PR (up-coming). Added an extra set of rules to the eslintConfig

export default class Header extends Component {
render() {
return (
Expand Down
1 change: 1 addition & 0 deletions examples/full/src/routes/home/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { h, Component } from 'preact';
import style from './style';

// eslint-disable-next-line
export default class Home extends Component {
render() {
return (
Expand Down
18 changes: 9 additions & 9 deletions examples/full/src/routes/profile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ export default class Profile extends Component {
count: 10
};

// update the current time
updateTime = () => {
this.setState({ time: Date.now() });
};

increment = () => {
this.setState({ count: this.state.count+1 });
};

// gets called when this route is navigated to
componentDidMount() {
// start a timer for the clock:
Expand All @@ -18,15 +27,6 @@ export default class Profile extends Component {
clearInterval(this.timer);
}

// update the current time
updateTime = () => {
this.setState({ time: Date.now() });
};

increment = () => {
this.setState({ count: this.state.count+1 });
};

// Note: `user` comes from the URL, courtesy of our router
render({ user }, { time, count }) {
return (
Expand Down
1 change: 1 addition & 0 deletions examples/root/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { h, Component } from 'preact';
import { Link } from 'preact-router/match';
import style from './style';

// eslint-disable-next-line
export default class Header extends Component {
render() {
return (
Expand Down
1 change: 1 addition & 0 deletions examples/root/routes/home/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { h, Component } from 'preact';
import style from './style';

// eslint-disable-next-line
export default class Home extends Component {
render() {
return (
Expand Down
18 changes: 9 additions & 9 deletions examples/root/routes/profile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ export default class Profile extends Component {
count: 10
};

// update the current time
updateTime = () => {
this.setState({ time: Date.now() });
};

increment = () => {
this.setState({ count: this.state.count+1 });
};

// gets called when this route is navigated to
componentDidMount() {
// start a timer for the clock:
Expand All @@ -18,15 +27,6 @@ export default class Profile extends Component {
clearInterval(this.timer);
}

// update the current time
updateTime = () => {
this.setState({ time: Date.now() });
};

increment = () => {
this.setState({ count: this.state.count+1 });
};

// Note: `user` comes from the URL, courtesy of our router
render({ user }, { time, count }) {
return (
Expand Down