From dc40b0f280f5728c7e72425aed7b144faa38cbdc Mon Sep 17 00:00:00 2001 From: MrTimscampi Date: Sat, 14 Nov 2020 19:41:50 +0100 Subject: [PATCH] style(all): fix issues with updated linting config --- .eslintrc.js | 9 +++++++-- components/Card.vue | 7 ++++++- components/ConnectionMonitor.vue | 2 +- components/FilterButton.vue | 2 +- components/HomeSection.vue | 6 +++--- components/LocaleSwitcher.vue | 2 +- components/RelatedItems.vue | 6 +++--- components/UserButton.vue | 2 +- layouts/default.vue | 2 +- pages/index.vue | 10 +++++----- pages/item/_itemId/play.vue | 2 +- pages/library/_viewId.vue | 12 ++++++------ pages/login.vue | 10 +++++----- pages/person/_itemId/index.vue | 12 ++++++------ plugins/components/vueVirtualScroller.ts | 4 ++-- plugins/components/vueperSlides.ts | 4 ++-- 16 files changed, 51 insertions(+), 41 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0ae4606a..1da5c1bf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -19,7 +19,6 @@ module.exports = { 'plugin:import/typescript' ], plugins: ['prettier', 'promise', 'import', 'jsdoc'], - // add your custom rules here rules: { 'import/newline-after-import': 'error', 'import/order': 'error', @@ -27,13 +26,19 @@ module.exports = { 'promise/no-return-in-finally': 'error', 'promise/prefer-await-to-callbacks': 'error', 'promise/prefer-await-to-then': 'error', + // Force some component order stuff, formatting and such, for consistency 'vue/component-name-in-template-casing': [ 'error', 'kebab-case', { ignores: [] } - ] + ], + 'vue/order-in-components': 'error', + 'vue/v-bind-style': 'error', + 'vue/v-on-style': 'error', + 'vue/v-slot-style': 'error', + 'vue/attributes-order': 'error' }, settings: { 'import/resolver': { diff --git a/components/Card.vue b/components/Card.vue index 753bba91..75b3619f 100644 --- a/components/Card.vue +++ b/components/Card.vue @@ -41,7 +41,7 @@ item.UserData.PlayedPercentage && item.UserData.PlayedPercentage > 0 " - v-model="item.UserData.PlayedPercentage" + v-model="progress" color="primary accent-4" class="align-self-end" /> @@ -196,6 +196,11 @@ export default Vue.extend({ return `${this.item.ProductionYear} - ${endYear}`; } return ''; + }, + progress: { + get(): number | false { + return this.item.UserData?.PlayedPercentage || false; + } } } }); diff --git a/components/ConnectionMonitor.vue b/components/ConnectionMonitor.vue index c61c654b..72f597b6 100644 --- a/components/ConnectionMonitor.vue +++ b/components/ConnectionMonitor.vue @@ -1,7 +1,7 @@