diff options
author | Zero~Informatique | 2019-12-21 11:04:14 +0100 |
---|---|---|
committer | Zero~Informatique | 2019-12-21 11:04:14 +0100 |
commit | 91d3148f97ca59769648f9307f3d7e65b1bd7e95 (patch) | |
tree | 661863c39c630346771a88b2702ec1e18ad4f584 /viewer | |
parent | 3f21d10338afe8eab699aaaea060556579e4b3c3 (diff) | |
download | ldgallery-91d3148f97ca59769648f9307f3d7e65b1bd7e95.tar.gz |
viewer:
ESLint rules
Diffstat (limited to 'viewer')
-rw-r--r-- | viewer/.eslintrc.js | 24 | ||||
-rw-r--r-- | viewer/src/views/Gallery.vue | 2 |
2 files changed, 23 insertions, 3 deletions
diff --git a/viewer/.eslintrc.js b/viewer/.eslintrc.js index be91544..76f59fd 100644 --- a/viewer/.eslintrc.js +++ b/viewer/.eslintrc.js | |||
@@ -1,14 +1,34 @@ | |||
1 | module.exports = { | 1 | module.exports = { |
2 | root: true, | 2 | root: true, |
3 | |||
3 | env: { | 4 | env: { |
4 | node: true, | 5 | node: true, |
5 | }, | 6 | }, |
6 | extends: ["plugin:vue/essential", "@vue/typescript"], | 7 | |
8 | 'extends': [ | ||
9 | 'plugin:vue/essential', | ||
10 | '@vue/typescript' | ||
11 | ], | ||
12 | |||
7 | rules: { | 13 | rules: { |
8 | "no-console": process.env.NODE_ENV === "production" ? "error" : "off", | 14 | "no-console": process.env.NODE_ENV === "production" ? "error" : "off", |
9 | "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", | 15 | "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", |
16 | 'vue/attribute-hyphenation': 'warn', | ||
17 | 'vue/html-closing-bracket-spacing': 'warn', | ||
18 | 'vue/html-end-tags': 'error', | ||
19 | 'vue/html-quotes': 'warn', | ||
20 | 'vue/html-self-closing': 'warn', | ||
21 | 'vue/no-multi-spaces': 'warn', | ||
22 | 'vue/no-spaces-around-equal-signs-in-attribute': 'warn', | ||
23 | 'vue/no-template-shadow': 'error', | ||
24 | 'vue/v-bind-style': 'warn', | ||
25 | 'vue/v-on-style': 'warn', | ||
26 | 'vue/attributes-order': 'warn', | ||
27 | 'vue/this-in-template': 'warn' | ||
10 | }, | 28 | }, |
29 | |||
11 | parserOptions: { | 30 | parserOptions: { |
12 | parser: "@typescript-eslint/parser", | 31 | parser: '@typescript-eslint/parser', |
13 | }, | 32 | }, |
33 | |||
14 | }; | 34 | }; |
diff --git a/viewer/src/views/Gallery.vue b/viewer/src/views/Gallery.vue index 3625838..55b93db 100644 --- a/viewer/src/views/Gallery.vue +++ b/viewer/src/views/Gallery.vue | |||
@@ -44,7 +44,7 @@ export default class Root extends Vue { | |||
44 | return null; | 44 | return null; |
45 | } | 45 | } |
46 | 46 | ||
47 | private checkType(type: string) { | 47 | private checkType(type: string): boolean { |
48 | return (this.currentItem && this.currentItem.properties.type === type) || false; | 48 | return (this.currentItem && this.currentItem.properties.type === type) || false; |
49 | } | 49 | } |
50 | } | 50 | } |