diff --git a/.eslintrc b/.eslintrc
index 4063ab8d..b55321ed 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -5,24 +5,20 @@
"parser": "@typescript-eslint/parser",
"project": "./tsconfig.json",
"sourceType": "module",
- "extraFileExtensions": [
- ".vue",
- ".d.ts"
- ]
+ "extraFileExtensions": [".vue", ".d.ts"]
},
"extends": [
"standard",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
- "standard-with-typescript",
- "plugin:vue/vue3-recommended"
+ "plugin:vue/vue3-recommended",
+ "standard-with-typescript"
],
"rules": {
"no-undef": "off",
- "comma-dangle": [
- "warn",
- "always-multiline"
- ],
- "@typescript-eslint/promise-function-async": "off"
+ "no-unused-vars": "off",
+ "comma-dangle": ["warn", "always-multiline"],
+ "@typescript-eslint/promise-function-async": "off",
+ "@typescript-eslint/no-unused-vars": "off"
}
-}
\ No newline at end of file
+}
diff --git a/README.md b/README.md
index 70216005..7e16930a 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@ yarn build
- [x] Unit test ([Vue Test Utils](https://github.com/vuejs/vue-test-utils-next))
- [ ] Unit test ([Vue Testing Library](https://testing-library.com/docs/vue-testing-library/intro)) (Temporarily unavailable)
- [x] E2E test ([Cypress](https://docs.cypress.io))
-- [ ] [SFC Script Setup](https://github.com/vuejs/rfcs/blob/sfc-improvements/active-rfcs/0000-sfc-script-setup.md) (Unstable)
+- [x] [SFC Script Setup](https://github.com/vuejs/rfcs/blob/sfc-improvements/active-rfcs/0000-sfc-script-setup.md) (Experimental)
- [x] Vetur Tools: [VTI](https://github.com/mutoe/vue3-realworld-example-app/pull/28) and [optionally IDE hints](https://github.com/mutoe/vue3-realworld-example-app/commit/8367f89a99c467d181d9c7f4144deb05cec55210#commitcomment-43957089)
# Contributors
diff --git a/cypress.json b/cypress.json
index ddb2b521..e688a5fa 100644
--- a/cypress.json
+++ b/cypress.json
@@ -1,7 +1,4 @@
{
"baseUrl": "https://mutoe.github.io/vue3-realworld-example-app",
- "experimentalNetworkStubbing": true,
"chromeWebSecurity": false
-
-
}
diff --git a/package.json b/package.json
index bd258d11..e2579f7f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "vue3-realworld-example-app",
- "version": "1.0.0",
+ "version": "1.1.0",
"license": "MIT",
"scripts": {
"dev": "vite",
@@ -15,8 +15,8 @@
"@harlem/core": "^1.1.0",
"deepmerge": "^4.2.2",
"dompurify": "^2.2.6",
- "marked": "^2.0.0",
- "vue": "^3.0.2",
+ "marked": "^1.2.9",
+ "vue": "^3.0.6",
"vue-router": "^4.0.4"
},
"devDependencies": {
@@ -25,6 +25,7 @@
"@testing-library/vue": "^6.3.4",
"@types/dompurify": "^2.2.1",
"@types/jest": "^26.0.20",
+ "@types/marked": "^1.2.2",
"@typescript-eslint/eslint-plugin": "^4.15.2",
"@typescript-eslint/parser": "^4.15.2",
"@vitejs/plugin-vue": "^1.1.4",
@@ -39,14 +40,13 @@
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
- "eslint-plugin-standard": "^5.0.0",
"eslint-plugin-vue": "^7.6.0",
"husky": "^5.1.1",
"jest": "^26.6.3",
"jsdom": "^16.4.0",
"lint-staged": "^10.5.4",
"ts-jest": "^26.5.1",
- "typescript": "^4.1.5",
+ "typescript": "~4.1.5",
"vite": "^2.0.2",
"vti": "^0.0.24",
"vue-jest": "^5.0.0-alpha.8"
diff --git a/src/App.vue b/src/App.vue
index d3193e29..39581967 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -4,16 +4,7 @@
-
diff --git a/src/components/AppFooter.vue b/src/components/AppFooter.vue
index a171c80c..01c9ae9c 100644
--- a/src/components/AppFooter.vue
+++ b/src/components/AppFooter.vue
@@ -21,11 +21,3 @@
-
-
diff --git a/src/components/AppLink.vue b/src/components/AppLink.vue
index 39e42c09..0b758f0d 100644
--- a/src/components/AppLink.vue
+++ b/src/components/AppLink.vue
@@ -1,29 +1,19 @@
-
+
-
diff --git a/src/components/AppNavigation.vue b/src/components/AppNavigation.vue
index 128a5002..4ce10ee9 100644
--- a/src/components/AppNavigation.vue
+++ b/src/components/AppNavigation.vue
@@ -1,29 +1,17 @@
-
diff --git a/src/components/ArticleDetailComment.vue b/src/components/ArticleDetailComment.vue
index 011d3508..c58ff98a 100644
--- a/src/components/ArticleDetailComment.vue
+++ b/src/components/ArticleDetailComment.vue
@@ -41,24 +41,17 @@
-
diff --git a/src/components/ArticleDetailComments.vue b/src/components/ArticleDetailComments.vue
index 759fb347..edafae2b 100644
--- a/src/components/ArticleDetailComments.vue
+++ b/src/components/ArticleDetailComments.vue
@@ -13,8 +13,8 @@
/>
-
diff --git a/src/components/ArticleDetailCommentsForm.vue b/src/components/ArticleDetailCommentsForm.vue
index 6e0db8b7..f315cbe3 100644
--- a/src/components/ArticleDetailCommentsForm.vue
+++ b/src/components/ArticleDetailCommentsForm.vue
@@ -35,8 +35,8 @@
-
diff --git a/src/components/ArticleDetailMeta.vue b/src/components/ArticleDetailMeta.vue
index 168a8aa4..6902381f 100644
--- a/src/components/ArticleDetailMeta.vue
+++ b/src/components/ArticleDetailMeta.vue
@@ -1,22 +1,21 @@
-
-
+
+
{{ article.author.username }}
-
{{ (new Date(article.createdAt)).toLocaleDateString() }}
+
{{
+ new Date(article.createdAt).toLocaleDateString()
+ }}
@@ -44,7 +44,7 @@
v-if="displayEditButton"
class="btn btn-outline-secondary btn-sm space"
name="edit-article"
- :params="{slug: article.slug}"
+ :params="{ slug: article.slug }"
>
Edit Article
@@ -59,8 +59,8 @@
-
diff --git a/src/components/ArticlesList.vue b/src/components/ArticlesList.vue
index 111b6c10..b0eadeb4 100644
--- a/src/components/ArticlesList.vue
+++ b/src/components/ArticlesList.vue
@@ -1,24 +1,14 @@
-
+
-
+
Articles are downloading...
-
+
No articles are here... yet.
-
-
diff --git a/src/components/ArticlesListArticlePreview.vue b/src/components/ArticlesListArticlePreview.vue
index f1d13955..7025e3c0 100644
--- a/src/components/ArticlesListArticlePreview.vue
+++ b/src/components/ArticlesListArticlePreview.vue
@@ -3,24 +3,26 @@
{{ article.author.username }}
-
{{ new Date(article.createdAt).toDateString() }}
+
{{
+ new Date(article.createdAt).toDateString()
+ }}
-
diff --git a/src/components/ArticlesListNavigation.vue b/src/components/ArticlesListNavigation.vue
index 195aa79e..4ed703b1 100644
--- a/src/components/ArticlesListNavigation.vue
+++ b/src/components/ArticlesListNavigation.vue
@@ -22,81 +22,74 @@
-
diff --git a/src/components/PopularTags.vue b/src/components/PopularTags.vue
index 4dfd4c4b..1b049750 100644
--- a/src/components/PopularTags.vue
+++ b/src/components/PopularTags.vue
@@ -6,7 +6,7 @@
v-for="tag in tags"
:key="tag"
name="tag"
- :params="{tag}"
+ :params="{ tag }"
class="tag-pill tag-default"
>
{{ tag }}
@@ -14,20 +14,10 @@
-
diff --git a/src/composable/useArticles.ts b/src/composable/useArticles.ts
index 267b70f9..3d80bdec 100644
--- a/src/composable/useArticles.ts
+++ b/src/composable/useArticles.ts
@@ -80,6 +80,7 @@ export function useArticles () {
}
export type ArticlesType = 'global-feed' | 'my-feed' | 'tag-feed' | 'user-feed' | 'user-favorites-feed'
+
export const articlesTypes: ArticlesType[] = ['global-feed', 'my-feed', 'tag-feed', 'user-feed', 'user-favorites-feed']
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
export const isArticlesType = (type: any): type is ArticlesType => articlesTypes.includes(type)
diff --git a/src/pages/Article.vue b/src/pages/Article.vue
index 272a02d2..413921ad 100644
--- a/src/pages/Article.vue
+++ b/src/pages/Article.vue
@@ -28,17 +28,7 @@
-
diff --git a/src/pages/EditArticle.vue b/src/pages/EditArticle.vue
index 5aa339d9..f1c9ae27 100644
--- a/src/pages/EditArticle.vue
+++ b/src/pages/EditArticle.vue
@@ -65,8 +65,8 @@
-
diff --git a/src/pages/Home.vue b/src/pages/Home.vue
index ac652fc1..5a3f18bd 100644
--- a/src/pages/Home.vue
+++ b/src/pages/Home.vue
@@ -43,17 +43,7 @@
-
diff --git a/src/pages/Login.vue b/src/pages/Login.vue
index c8a91700..a0ded37a 100644
--- a/src/pages/Login.vue
+++ b/src/pages/Login.vue
@@ -3,48 +3,35 @@
-
- Sign in
-
+
Sign in
-
- Need an account?
-
+ Need an account?
- -
- {{ field }} {{ error ? error[0] : '' }}
+
-
+ {{ field }} {{ error ? error[0] : "" }}
-
@@ -66,47 +67,27 @@
-
diff --git a/src/pages/Register.vue b/src/pages/Register.vue
index 5d004ebe..5181ee80 100644
--- a/src/pages/Register.vue
+++ b/src/pages/Register.vue
@@ -3,28 +3,18 @@
-
- Sign up
-
+
Sign up
-
- Have an account?
-
+ Have an account?
- -
- {{ field }} {{ error ? error[0] : '' }}
+
-
+ {{ field }} {{ error ? error[0] : "" }}
-