Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Commit

Permalink
Apply ESLint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Nov 28, 2017
1 parent 04c4b20 commit 1c1df23
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
8 changes: 5 additions & 3 deletions .eslintrc.json
@@ -1,7 +1,9 @@
{
"env": {
"node": true
},
"extends": [
"plugin:github/recommended",
"plugin:github/browser",
"plugin:github/es6"
"plugin:github/es6",
"plugin:github/browser"
]
}
2 changes: 2 additions & 0 deletions prettier.config.js
@@ -0,0 +1,2 @@
/* @flow */
module.exports = require('eslint-plugin-github/prettier.config')
10 changes: 5 additions & 5 deletions selector-observer.js
Expand Up @@ -49,7 +49,7 @@ const scheduleMacroTask = (function() {

return function(callback) {
queue.push(callback)
el.setAttribute('data-foo', '' + Date.now())
el.setAttribute('data-foo', `${Date.now()}`)
}
})()

Expand Down Expand Up @@ -90,7 +90,7 @@ function runInit(el, observer) {
initializers = {}
initializerMap.set(el, initializers)
}
initializers[''+observer.id] = initializer
initializers[`${observer.id}`] = initializer
}
initIds.push(observer.id)
}
Expand All @@ -112,7 +112,7 @@ function runAdd(el, observer) {
if (addIds.indexOf(observer.id) === -1) {
observer.elements.push(el)
const initializers = initializerMap.get(el)
const initializer = initializers ? initializers[''+observer.id] : null
const initializer = initializers ? initializers[`${observer.id}`] : null
if (initializer) {
if (initializer.add) {
initializer.add.call(undefined, el)
Expand Down Expand Up @@ -146,7 +146,7 @@ function runRemove(el, observer) {
index = addIds.indexOf(observer.id)
if (index !== -1) {
const initializers = initializerMap.get(el)
const initializer = initializers ? initializers[''+observer.id] : null
const initializer = initializers ? initializers[`${observer.id}`] : null
if (initializer) {
if (initializer.remove) {
initializer.remove.call(undefined, el)
Expand All @@ -171,7 +171,7 @@ function runRemove(el, observer) {
observer.elements.splice(index, 1)
}
const initializers = initializerMap.get(el)
const initializer = initializers ? initializers[''+observer.id] : null
const initializer = initializers ? initializers[`${observer.id}`] : null
if (initializer) {
if (initializer.remove) {
initializer.remove.call(undefined, el)
Expand Down

0 comments on commit 1c1df23

Please sign in to comment.