From 063aefc48e5db0040198837fec4f5a31c39b88e5 Mon Sep 17 00:00:00 2001 From: Travis Shivers Date: Wed, 27 May 2020 14:34:29 -0500 Subject: [PATCH] vue lint --- .eslintrc.js | 13 +- src/App.vue | 185 +++++++--- src/components/application/joinroom.vue | 299 +++++++++++---- src/components/application/plexbrowser.vue | 208 ++++++++--- .../application/plexbrowser/plexalbum.vue | 215 +++++++---- .../application/plexbrowser/plexartist.vue | 181 ++++++--- .../application/plexbrowser/plexcontent.vue | 343 +++++++++++++----- .../application/plexbrowser/plexitem.vue | 24 +- .../application/plexbrowser/plexlibrary.vue | 76 +++- .../application/plexbrowser/plexseason.vue | 191 ++++++---- .../application/plexbrowser/plexseries.vue | 164 ++++++--- .../application/plexbrowser/plexserver.vue | 260 +++++++++---- .../application/plexbrowser/plexthumb.vue | 137 ++++--- src/components/application/plexclient.vue | 97 ++--- src/components/application/plexsettings.vue | 38 +- src/components/application/ptplayer.vue | 339 ++++++++++------- .../application/ptplayer/videoplayer.vue | 12 +- src/components/application/settings.vue | 95 +++-- src/components/application/walkthrough.vue | 170 ++++++--- src/components/join.vue | 126 +++++-- src/components/message.vue | 81 ++++- src/components/messages.vue | 56 ++- src/components/signin.vue | 97 +++-- src/components/signout.vue | 17 +- src/donate.vue | 84 ++++- src/leftsidebar.vue | 122 +++++-- src/main.js | 12 +- src/nowplayingchip.vue | 52 ++- src/sidebar.vue | 253 +++++++++---- src/upnext.vue | 170 ++++++--- vue.config.js | 12 +- 31 files changed, 2904 insertions(+), 1225 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index a01d8807..e28ab9c2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,13 +1,24 @@ +// Inspired by https://stackoverflow.com/questions/60187885/how-to-configure-vue-cli-4-with-eslint-airbnb-rules-typescript-stylelint-f module.exports = { root: true, env: { node: true, }, - extends: ['plugin:vue/essential', '@vue/airbnb'], + extends: ['plugin:vue/recommended', '@vue/airbnb'], parserOptions: { parser: 'babel-eslint', + ecmaVersion: 2020, }, rules: { + 'class-methods-use-this': 0, + 'max-len': [ + 'error', + { + code: 100, + ignoreComments: true, + ignoreUrls: true, + }, + ], 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], diff --git a/src/App.vue b/src/App.vue index 9b18b5d6..26ce2276 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,57 +1,93 @@ - + - -
{{ snackbarMsg }}
+ +
+ {{ snackbarMsg }} +
- - + + + :donate-dialog="donateDialog" + :on-close="() => (this.donateDialog = false)" + /> @@ -175,6 +250,14 @@ export default { fscreen.requestFullscreen(document.body); }, }, + watch: { + showRightDrawerButton() { + // TODO: fix this is hacky + if (this.showRightDrawerButton) { + this.SET_RIGHT_SIDEBAR_OPEN(true); + } + }, + }, created() { this.configFetchPromise = this.fetchConfig(); }, @@ -276,14 +359,6 @@ export default { this.loading = false; }, - watch: { - showRightDrawerButton() { - // TODO: fix this is hacky - if (this.showRightDrawerButton) { - this.SET_RIGHT_SIDEBAR_OPEN(true); - } - }, - }, computed: { ...mapGetters([ 'getPlex', diff --git a/src/components/application/joinroom.vue b/src/components/application/joinroom.vue index 28103239..fc90b9f1 100644 --- a/src/components/application/joinroom.vue +++ b/src/components/application/joinroom.vue @@ -1,30 +1,75 @@