From 34d0452c14b9d95c936975674021bedce449b7ed Mon Sep 17 00:00:00 2001 From: K Date: Sat, 9 May 2020 22:24:26 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Fix=20code=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 10 ++-- api/news.js | 10 ++-- components/common/TheDrawer.vue | 54 ++++++++++----------- components/common/TheHeader.vue | 6 +-- components/common/TheScrollTopButton.vue | 10 ++-- components/main/NewsCard.vue | 12 ++--- components/parts/SnackBar.vue | 12 ++--- components/share/ShareButtons.vue | 26 +++++----- components/share/ShareDialog.vue | 16 +++--- layouts/default.vue | 4 +- layouts/error.vue | 8 +-- middleware/redirect.js | 2 +- nuxt.config.js | 62 ++++++++++++------------ pages/headline/_category.vue | 20 ++++---- pages/index.vue | 20 ++++---- pages/world/_source.vue | 24 ++++----- plugins/aos.js | 2 +- plugins/axios.js | 4 +- store/index.js | 6 +-- 19 files changed, 154 insertions(+), 154 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 562bc0f..6d83fbd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,20 +2,20 @@ module.exports = { root: true, env: { browser: true, - node: true + node: true, }, parserOptions: { - parser: "babel-eslint" + parser: "babel-eslint", }, extends: [ "@nuxtjs", "prettier", "prettier/vue", "plugin:prettier/recommended", - "plugin:nuxt/recommended" + "plugin:nuxt/recommended", ], plugins: ["prettier"], rules: { - "vue/max-attributes-per-line": "off" - } + "vue/max-attributes-per-line": "off", + }, }; diff --git a/api/news.js b/api/news.js index 8433b41..1cb2470 100644 --- a/api/news.js +++ b/api/news.js @@ -6,16 +6,16 @@ const app = Express(); const newsApi = axios.create({ headers: { common: { - Authorization: "Bearer " + process.env.API_KEY - } - } + Authorization: "Bearer " + process.env.API_KEY, + }, + }, }); // 共通ヘッダー app.use((req, res, next) => { res.set({ "Cache-Control": "public, max-age=300, s-maxage=7200", - "Content-Type": "application/json; charset=utf-8" + "Content-Type": "application/json; charset=utf-8", }); next(); }); @@ -30,7 +30,7 @@ app.get("/api/news", async (req, res, next) => { "entertainment", "sports", "science", - "health" + "health", ]; const response = []; try { diff --git a/components/common/TheDrawer.vue b/components/common/TheDrawer.vue index 2a72be8..cdb50ca 100644 --- a/components/common/TheDrawer.vue +++ b/components/common/TheDrawer.vue @@ -64,13 +64,13 @@ テーマ切り替え @@ -103,23 +103,23 @@ const ShareDialog = () => import("~/components/share/ShareDialog.vue"); export default { components: { - ShareDialog + ShareDialog, }, data: () => ({ drawerItems: [ { title: "トップニュース", icon: "mdi-newspaper-variant-multiple-outline", - link: { name: "index" } + link: { name: "index" }, }, { title: "ヘッドライン", icon: "mdi-fire", link: { name: "headline-category", - params: { category: "general" } - } - } + params: { category: "general" }, + }, + }, ], headlineCategory: [ { @@ -127,63 +127,63 @@ export default { icon: "mdi-laptop-mac", link: { name: "headline-category", - params: { category: "technology" } - } + params: { category: "technology" }, + }, }, { title: "ビジネス", icon: "mdi-domain", link: { name: "headline-category", - params: { category: "business" } - } + params: { category: "business" }, + }, }, { title: "エンターテイメント", icon: "mdi-filmstrip", link: { name: "headline-category", - params: { category: "entertainment" } - } + params: { category: "entertainment" }, + }, }, { title: "スポーツ", icon: "mdi-soccer", link: { name: "headline-category", - params: { category: "sports" } - } + params: { category: "sports" }, + }, }, { title: "サイエンス", icon: "mdi-atom", link: { name: "headline-category", - params: { category: "science" } - } + params: { category: "science" }, + }, }, { title: "ヘルス", icon: "mdi-heart-circle-outline", link: { name: "headline-category", - params: { category: "health" } - } - } + params: { category: "health" }, + }, + }, ], bottomItems: [ { title: "Twitter", link: "https://twitter.com/intent/follow?screen_name=k_urtica", - icon: "mdi-twitter" + icon: "mdi-twitter", }, { title: "GitHub Repo", link: "https://github.com/kiysi/nuxt-news-app", - icon: "mdi-github-circle" - } + icon: "mdi-github-circle", + }, ], - darkMode: false + darkMode: false, }), computed: { drawer: { @@ -192,13 +192,13 @@ export default { }, set(val) { this.$store.commit("setDrawer", val); - } - } + }, + }, }, watch: { darkMode() { this.$vuetify.theme.dark = !this.$vuetify.theme.dark; - } - } + }, + }, }; diff --git a/components/common/TheHeader.vue b/components/common/TheHeader.vue index fb3ee4b..9d57e6d 100644 --- a/components/common/TheHeader.vue +++ b/components/common/TheHeader.vue @@ -1,6 +1,6 @@