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 @@