Update and fix linting
This commit is contained in:
parent
0b608c586c
commit
c580a9eb89
|
@ -1,12 +1,7 @@
|
|||
{
|
||||
"parser": "babel-eslint",
|
||||
"extends": "airbnb/base",
|
||||
"globals": {
|
||||
"__DEV__": false,
|
||||
"__DEMO__": false
|
||||
},
|
||||
"rules": {
|
||||
"comma-dangle": [2, "always-multiline"],
|
||||
"no-underscore-dangle": 0
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,18 +20,17 @@
|
|||
"author": "Paulus Schoutsen <Paulus@PaulusSchoutsen.nl> (http://paulusschoutsen.nl)",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"home-assistant-js": "git+https://github.com/balloob/home-assistant-js.git#cd46830c19d3e9593d112def0202a832afa4d839",
|
||||
"home-assistant-js": "git+https://github.com/balloob/home-assistant-js.git#9a93089d0e3e41cecb3c6e99d5672341ca6d4152",
|
||||
"lodash": "^4.5.0",
|
||||
"moment": "^2.11.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.5",
|
||||
"babel-eslint": "^5.0.0",
|
||||
"babel-loader": "^6.2",
|
||||
"babel-preset-es2015": "^6.3.13",
|
||||
"bower": "^1.7.7",
|
||||
"eslint": "^1.10.3",
|
||||
"eslint-config-airbnb": "^5.0.0",
|
||||
"eslint": "^2.2.0",
|
||||
"eslint-config-airbnb": "^6.0.2",
|
||||
"html-minifier": "^1.2.0",
|
||||
"vulcanize": "^1.14.6",
|
||||
"webpack": "^1.12"
|
||||
|
|
|
@ -62,7 +62,7 @@ export default new Polymer({
|
|||
updateCards(columns, states, showIntroduction) {
|
||||
this.debounce(
|
||||
'updateCards',
|
||||
() => this.cards = this.computeCards(columns, states, showIntroduction),
|
||||
() => { this.cards = this.computeCards(columns, states, showIntroduction); },
|
||||
0
|
||||
);
|
||||
},
|
||||
|
@ -147,7 +147,7 @@ export default new Polymer({
|
|||
byDomain.get(domain).sortBy(entitySortBy)
|
||||
.forEach(groupState => {
|
||||
const entities = util.expandGroup(groupState, states);
|
||||
entities.forEach(entity => hasGroup[entity.entityId] = true);
|
||||
entities.forEach(entity => { hasGroup[entity.entityId] = true; });
|
||||
addEntitiesCard(groupState.entityId, entities.toArray(), groupState);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -55,7 +55,7 @@ export default new Polymer({
|
|||
}
|
||||
this.mouseMoveIsThrottled = false;
|
||||
this.processColorSelect(ev.touches[0]);
|
||||
this.async(() => this.mouseMoveIsThrottled = true, 100);
|
||||
this.async(() => { this.mouseMoveIsThrottled = true; }, 100);
|
||||
},
|
||||
|
||||
onMouseMove(ev) {
|
||||
|
@ -64,7 +64,7 @@ export default new Polymer({
|
|||
}
|
||||
this.mouseMoveIsThrottled = false;
|
||||
this.processColorSelect(ev);
|
||||
this.async(() => this.mouseMoveIsThrottled = true, 100);
|
||||
this.async(() => { this.mouseMoveIsThrottled = true; }, 100);
|
||||
},
|
||||
|
||||
processColorSelect(ev) {
|
||||
|
|
|
@ -70,7 +70,9 @@ export default new Polymer({
|
|||
if (stateInfo.length === 0) return;
|
||||
|
||||
const entityDisplay = stateInfo[0].entityDisplay;
|
||||
/* eslint-disable prefer-const */
|
||||
let newLastChanged;
|
||||
/* eslint-enable prefer-const */
|
||||
let prevState = null;
|
||||
let prevLastChanged = null;
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ export default new Polymer({
|
|||
googleApiLoaded() {
|
||||
window.google.load('visualization', '1', {
|
||||
packages: ['timeline', 'corechart'],
|
||||
callback: () => this.apiLoaded = true,
|
||||
callback: () => { this.apiLoaded = true; },
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ export default new Polymer({
|
|||
|
||||
dialogOpenChanged(newVal) {
|
||||
if (newVal) {
|
||||
this.async(() => this._delayedDialogOpen = true, 10);
|
||||
this.async(() => { this._delayedDialogOpen = true; }, 10);
|
||||
} else if (!newVal && this.stateObj) {
|
||||
this.async(() => moreInfoActions.deselectEntity(), 10);
|
||||
this._delayedDialogOpen = false;
|
||||
|
|
|
@ -58,10 +58,10 @@ export default new Polymer({
|
|||
loadIcons() {
|
||||
// If the import fails, we'll try to import again, must be a server glitch
|
||||
// Since HTML imports only resolve once, we import another url.
|
||||
const success = () => this.iconsLoaded = true;
|
||||
const success = () => { this.iconsLoaded = true; };
|
||||
this.importHref(`/static/mdi-${this.icons}.html`,
|
||||
success,
|
||||
() => this.importHref(`/static/mdi.html`, success, success));
|
||||
() => this.importHref('/static/mdi.html', success, success));
|
||||
},
|
||||
|
||||
created() {
|
||||
|
|
|
@ -140,9 +140,7 @@ export default new Polymer({
|
|||
},
|
||||
|
||||
computeRefreshButtonClass(isFetching) {
|
||||
if (isFetching) {
|
||||
return 'ha-spin';
|
||||
}
|
||||
return isFetching ? 'ha-spin' : '';
|
||||
},
|
||||
|
||||
computeShowIntroduction(currentView, introductionLoaded, states) {
|
||||
|
|
|
@ -57,6 +57,6 @@ export default new Polymer({
|
|||
this.errorLog = 'Loading error log…';
|
||||
|
||||
errorLogActions.fetchErrorLog().then(
|
||||
log => this.errorLog = log || 'No errors have been reported.');
|
||||
log => { this.errorLog = log || 'No errors have been reported.'; });
|
||||
},
|
||||
});
|
||||
|
|
|
@ -14,7 +14,7 @@ export default function dynamicContentUpdater(root, newElementTag, attributes) {
|
|||
customEl = document.createElement(newElementTag);
|
||||
}
|
||||
|
||||
Object.keys(attributes).forEach(key => customEl[key] = attributes[key]);
|
||||
Object.keys(attributes).forEach(key => { customEl[key] = attributes[key]; });
|
||||
|
||||
if (customEl.parentNode === null) {
|
||||
rootEl.appendChild(customEl);
|
||||
|
|
Loading…
Reference in New Issue