Skip to content

Commit

Permalink
templates: linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Sep 11, 2018
1 parent 719ab08 commit da891f2
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 15 deletions.
1 change: 0 additions & 1 deletion packages/cli/templates/preact-router/components/Hero.js
Expand Up @@ -13,7 +13,6 @@ export default class Hero extends Component {
const elem = this.shapes;
const ww = elem.clientWidth;
const wh = elem.clientHeight;
const offset = elem.offsetTop;
const steps = wh / 2;

function Particle() {
Expand Down
1 change: 0 additions & 1 deletion packages/cli/templates/preact/components/Hero.js
Expand Up @@ -13,7 +13,6 @@ export default class Hero extends Component {
const elem = this.shapes;
const ww = elem.clientWidth;
const wh = elem.clientHeight;
const offset = elem.offsetTop;
const steps = wh / 2;

function Particle() {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/templates/preact/components/Nav.js
Expand Up @@ -7,7 +7,7 @@ export default class Nav extends Component {
};

componentDidMount() {
addEventListener('scroll', ev => {
addEventListener('scroll', () => {
let stuck = window.pageYOffset > 0;
this.setState({ stuck });
}, { passive:true });
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/templates/react-router/components/Nav.js
Expand Up @@ -8,7 +8,7 @@ export default class Nav extends React.Component {
};

componentDidMount() {
addEventListener('scroll', ev => {
addEventListener('scroll', () => {
let stuck = window.pageYOffset > 0;
this.setState({ stuck });
}, { passive:true });
Expand Down
1 change: 0 additions & 1 deletion packages/cli/templates/react/components/Hero.js
Expand Up @@ -13,7 +13,6 @@ export default class Hero extends React.Component {
const elem = this.shapes;
const ww = elem.clientWidth;
const wh = elem.clientHeight;
const offset = elem.offsetTop;
const steps = wh / 2;

function Particle() {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/templates/react/components/Nav.js
Expand Up @@ -7,7 +7,7 @@ export default class Nav extends React.Component {
};

componentDidMount() {
addEventListener('scroll', ev => {
addEventListener('scroll', () => {
let stuck = window.pageYOffset > 0;
this.setState({ stuck });
}, { passive:true });
Expand Down
1 change: 0 additions & 1 deletion packages/cli/templates/vanilla-router/components/Hero.js
Expand Up @@ -6,7 +6,6 @@ const SHAPES = ['point', 'square', 'penta', 'circle', 'cross'];
function toParticles(div) {
const ww = div.clientWidth;
const wh = div.clientHeight;
const offset = div.offsetTop;
const steps = wh / 2;

function Particle() {
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/templates/vanilla-router/index.js
Expand Up @@ -3,19 +3,19 @@ import GAnalytics from 'ganalytics';
import App from '@components/App';
import './index.{{style}}';

let main;
let main, elem;
let root = document.querySelector('#app');

function init() {
let nxt = App();
elem = App();
main = elem._main;
let prev = root.firstElementChild;
main = nxt._main;

// Check for matching DOM (`export`)
if (prev) {
root.replaceChild(nxt, prev);
root.replaceChild(elem, prev);
} else {
root.appendChild(nxt);
root.appendChild(elem);
}

Navaid('/')
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/templates/vanilla-router/pages/About.js
Expand Up @@ -5,10 +5,10 @@ export default function () {
let div = document.createElement('div');
div.className = style.about;

let foo, bar;
let header = Intro();
div.appendChild(header);

let foo;
(foo = document.createElement('h1')).innerText = 'About Page';
header.appendChild(foo);

Expand Down
1 change: 0 additions & 1 deletion packages/cli/templates/vanilla/components/Hero.js
Expand Up @@ -6,7 +6,6 @@ const SHAPES = ['point', 'square', 'penta', 'circle', 'cross'];
function toParticles(div) {
const ww = div.clientWidth;
const wh = div.clientHeight;
const offset = div.offsetTop;
const steps = wh / 2;

function Particle() {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/templates/vue-router/router/index.js
Expand Up @@ -15,7 +15,7 @@ export default new Router({
}, {
path: '/blog',
component: () => import('@pages/Blog')
}, , {
}, {
path: '/blog/:title',
component: () => import('@pages/Article')
}
Expand Down

0 comments on commit da891f2

Please sign in to comment.