Skip to content
Snippets Groups Projects
Commit df7ebe15 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

knowledge-base-web-page-element-view: add eslint support

parent fe67c4b1
No related branches found
No related tags found
No related merge requests found
/vendor/**
/dist/**
/*.js
\ No newline at end of file
{
"env": {
"browser": true,
"es6": true,
"mocha": true
},
"extends": ["eslint:recommended", "plugin:jsdoc/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"no-unused-vars": ["error", { "args": "none" }],
"semi": [2, "always"],
"jsdoc/require-jsdoc": 0,
"jsdoc/require-param-description": 0,
"jsdoc/require-returns": 0,
"jsdoc/require-param-type": 0
}
}
\ No newline at end of file
...@@ -30,7 +30,9 @@ ...@@ -30,7 +30,9 @@
"rollup-plugin-delete": "^2.0.0", "rollup-plugin-delete": "^2.0.0",
"rollup-plugin-postcss": "^3.1.2", "rollup-plugin-postcss": "^3.1.2",
"rollup-plugin-serve": "^1.0.1", "rollup-plugin-serve": "^1.0.1",
"rollup-plugin-terser": "^7.0.2" "rollup-plugin-terser": "^7.0.2",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^30.6.4"
}, },
"dependencies": { "dependencies": {
"@dbp-toolkit/auth": "^0.1.0", "@dbp-toolkit/auth": "^0.1.0",
...@@ -52,6 +54,7 @@ ...@@ -52,6 +54,7 @@
"watch": "npm run watch-local", "watch": "npm run watch-local",
"watch-local": "rollup -c --watch", "watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development", "watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun" "test": "npm run build-test && karma start --singleRun",
"lint": "eslint ."
} }
} }
...@@ -125,7 +125,7 @@ export class KnowledgeBaseWebPageElementView extends ScopedElementsMixin(LitElem ...@@ -125,7 +125,7 @@ export class KnowledgeBaseWebPageElementView extends ScopedElementsMixin(LitElem
switch(propName) { switch(propName) {
case "lang": case "lang":
case "value": case "value":
case "entry-point-url": case "entry-point-url": {
this.html = ''; this.html = '';
const img = this._('#A2'); const img = this._('#A2');
if (img !== null) { if (img !== null) {
...@@ -136,6 +136,7 @@ export class KnowledgeBaseWebPageElementView extends ScopedElementsMixin(LitElem ...@@ -136,6 +136,7 @@ export class KnowledgeBaseWebPageElementView extends ScopedElementsMixin(LitElem
div.style.display = 'none'; div.style.display = 'none';
} }
break; break;
}
case "text": case "text":
this.class = this.text !== '' ? 'has-text' : ''; this.class = this.text !== '' ? 'has-text' : '';
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment