Permalink
Browse files

fix lint errors

  • Loading branch information...
1 parent 8c5d1d8 commit bec20735a6391c3d3139ed5608de649c332a446e @finom finom committed Sep 25, 2016
Showing with 9 additions and 9 deletions.
  1. +6 −6 js/index.js
  2. +2 −2 static/service-worker.js
  3. +1 −1 webpack.config.babel.js
View
@@ -54,37 +54,37 @@ class Application {
this.editor.on('change', () => this.highlightErrorLine(null));
// when user submits form (eg presses "Validate" button), call "go" method
- this.form.addEventListener('submit', evt => {
+ this.form.addEventListener('submit', (evt) => {
evt.preventDefault();
this.go();
});
// when user clicks "Clear" button, assign empty string to the "code" property
- this.form.addEventListener('reset', evt => {
+ this.form.addEventListener('reset', (evt) => {
evt.preventDefault();
this.code = '';
});
// when Ctrl-Enter is pressed, run "go" method
- doc.addEventListener('keyup', evt => {
+ doc.addEventListener('keyup', (evt) => {
const ENTER_KEY = 13;
if (evt.ctrlKey && evt.keyCode === ENTER_KEY) {
this.go();
}
});
// expands/unexpands faq by clicking #faqButton
- $.one('#faqButton').addEventListener('click', evt => {
+ $.one('#faqButton').addEventListener('click', (evt) => {
evt.preventDefault();
$.one('#faq').classList.toggle('expand');
});
// initializes Google Analytics tracking
// when user clicks on [data-ga="blah"], call ga('send', 'pageview', '/blah');
- $('[data-ga]').forEach(node => {
+ for (const node of $('[data-ga]')) {
node.addEventListener('click', () =>
ga('send', 'pageview', `/${node.getAttribute('data-ga')}`));
- });
+ }
return this;
}
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
-self.addEventListener('install', event => {
+self.addEventListener('install', (event) => {
console.log('WORKER: install event in progress.');
event.waitUntil(
caches
@@ -21,7 +21,7 @@ self.addEventListener('install', event => {
);
});
-self.addEventListener('fetch', event => {
+self.addEventListener('fetch', (event) => {
console.log('WORKER: fetch event in progress.');
if (event.request.method !== 'GET') {
@@ -71,7 +71,7 @@ entry.app.push(
);
plugins.push(new CopyWebpackPlugin([
- { from: 'static', to: '.' },
+ { from: 'static', to: '.' },
]));
module.exports = {

0 comments on commit bec2073

Please sign in to comment.