Move to ESLint

This commit is contained in:
Thomas Brouard 2022-05-23 19:00:39 +02:00
parent 5e7928e5bb
commit b84d2a9553
4 changed files with 35 additions and 16 deletions

31
.eslintrc.json Normal file
View file

@ -0,0 +1,31 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 12
},
"rules": {
"indent": [
"error",
2
],
"no-unused-vars": [
"error",
{
"args": "none"
}
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
]
}
}

View file

@ -1,9 +0,0 @@
{
"undef": true,
"unused": "vars",
"browser": true,
"node": true,
"eqnull": true,
"esnext": true,
"indent": 4
}

View file

@ -223,9 +223,9 @@ class Tab extends EventTarget {
if (badge) {
span.innerHTML = badge;
span.classList.remove('hidden');
span.classList.remove("hidden");
} else {
span.classList.add('hidden');
span.classList.add("hidden");
}
this.emit("badge-changed", badge, this);
@ -466,7 +466,7 @@ const TabPrivate = {
/**
* This makes the browser EventTarget API work similar to EventEmitter
*/
const eventEmitterMixin = {
const eventEmitterMixin = {
emit (type, ...args) {
this.dispatchEvent(new CustomEvent(type, { detail: args }));
},

View file

@ -14,9 +14,6 @@
display: block;
}
.etabs-tabs {
}
.etabs-tab {
display: none;
position: relative;
@ -44,7 +41,6 @@
.etabs-tab.visible {
display: inline-block;
float: left;
}
.etabs-tab.active {
@ -144,6 +140,7 @@ webview {
width: 100%;
height: 100%;
}
webview.visible {
visibility: visible;
}