From 92d61a23af1f3bc17551e42995ce2d0f1e584351 Mon Sep 17 00:00:00 2001
From: Kavin <20838718+FireMasterK@users.noreply.github.com>
Date: Fri, 8 Oct 2021 19:52:51 +0100
Subject: [PATCH] Make eslint work, and fix all warnings. (#511)
* Make eslint work, and fix all warnings.
* Don't ignore v-html rule globally.
* Remove eslint file and merge in package.json.
---
babel.config.js | 6 +-
package.json | 3 +
src/App.vue | 2 +-
src/components/Channel.vue | 21 ++--
src/components/Comment.vue | 81 +++++++------
src/components/ErrorHandler.vue | 4 +-
src/components/FeedPage.vue | 34 +++---
src/components/HistoryPage.vue | 21 ++--
src/components/ImportPage.vue | 6 +-
src/components/LoginPage.vue | 7 +-
src/components/Navigation.vue | 18 +--
src/components/Player.vue | 168 ++++++++++++++-------------
src/components/Playlist.vue | 28 ++---
src/components/Preferences.vue | 99 ++++++++--------
src/components/RegisterPage.vue | 7 +-
src/components/SearchResults.vue | 26 +++--
src/components/SearchSuggestions.vue | 5 +-
src/components/SubscriptionsPage.vue | 41 +++----
src/components/TrendingPage.vue | 12 +-
src/components/VideoItem.vue | 24 ++--
src/components/WatchVideo.vue | 103 ++++++++--------
src/main.js | 2 +-
vue.config.js | 32 ++---
yarn.lock | 24 ++++
24 files changed, 412 insertions(+), 362 deletions(-)
diff --git a/babel.config.js b/babel.config.js
index e9558405..6431b568 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -1,5 +1,3 @@
module.exports = {
- presets: [
- '@vue/cli-plugin-babel/preset'
- ]
-}
+ presets: ["@vue/cli-plugin-babel/preset"],
+};
diff --git a/package.json b/package.json
index e92bc45b..c4ddaa17 100644
--- a/package.json
+++ b/package.json
@@ -34,6 +34,8 @@
"@vue/compiler-sfc": "3.2.19",
"babel-eslint": "^10.1.0",
"eslint": "^7.32.0",
+ "eslint-config-prettier": "^8.3.0",
+ "eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^7.19.1"
},
"eslintConfig": {
@@ -43,6 +45,7 @@
},
"extends": [
"plugin:vue/vue3-essential",
+ "plugin:prettier/recommended",
"eslint:recommended"
],
"parserOptions": {
diff --git a/src/App.vue b/src/App.vue
index f215f248..28803eaa 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -7,7 +7,7 @@
@@ -22,11 +23,11 @@