From 71cb73aa5b40c6aef9c0670d19e8223fc66be3e0 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 28 Nov 2023 17:53:49 +0800 Subject: [PATCH] chore: eslint upgrade --- .eslintignore | 6 --- .eslintrc | 6 --- components/content/ArticleHeader.vue | 20 -------- components/content/ArticleToc.vue | 71 ---------------------------- components/content/ProseH2.vue | 12 ----- components/content/ProseH3.vue | 13 ----- eslint.config.js | 29 ++++++++++++ package.json | 4 +- pnpm-lock.yaml | 3 -- server/tsconfig.json | 3 ++ 10 files changed, 34 insertions(+), 133 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc delete mode 100644 components/content/ArticleHeader.vue delete mode 100644 components/content/ArticleToc.vue delete mode 100644 components/content/ProseH2.vue delete mode 100644 components/content/ProseH3.vue create mode 100644 eslint.config.js create mode 100644 server/tsconfig.json diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 02f09ec..0000000 --- a/.eslintignore +++ /dev/null @@ -1,6 +0,0 @@ -dist -node_modules -.output -.nuxt -content/posts -data diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 2893273..0000000 --- a/.eslintrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "@antfu", - "rules": { - "n/prefer-global/process": "off" - } -} diff --git a/components/content/ArticleHeader.vue b/components/content/ArticleHeader.vue deleted file mode 100644 index 0524b0f..0000000 --- a/components/content/ArticleHeader.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/components/content/ArticleToc.vue b/components/content/ArticleToc.vue deleted file mode 100644 index 636f4f4..0000000 --- a/components/content/ArticleToc.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - diff --git a/components/content/ProseH2.vue b/components/content/ProseH2.vue deleted file mode 100644 index 1fed87a..0000000 --- a/components/content/ProseH2.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/components/content/ProseH3.vue b/components/content/ProseH3.vue deleted file mode 100644 index 8fe5890..0000000 --- a/components/content/ProseH3.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..68d1dd2 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,29 @@ +import antfu from '@antfu/eslint-config' + +export default antfu( + {}, + { + ignores: [ + 'dist', + 'node_modules', + '.output', + '.nuxt', + 'content/posts', + 'data', + ], + }, + { + rules: { + "n/prefer-global/process": "off" + }, + }, + { + files: [ + '*.d.ts', + ], + rules: { + 'unused-imports/no-unused-vars': 'off', + 'eslint-comments/no-unlimited-disable': 'off', + }, + }, +) diff --git a/package.json b/package.json index a1a827e..3d3efba 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "name": "chris.me", + "type": "module", "private": true, "description": "Chris' blog build with Nuxt3.", "author": "Chris ", @@ -23,7 +24,7 @@ "build": "nuxt build", "preview": "nuxt preview", "lint": "eslint .", - "postinstall": "nuxt prepare && esno scripts/posts-route.ts" + "postinstall": "nuxt prepare" }, "dependencies": { "blurhash": "^2.0.5", @@ -38,7 +39,6 @@ "@iconify-json/logos": "^1.1.39", "@iconify-json/ri": "^1.1.13", "@iconify/utils": "^2.1.12", - "@nuxt/devtools": "^1.0.4", "@types/fs-extra": "^11.0.4", "@unocss/nuxt": "^0.57.7", "@vueuse/nuxt": "^10.6.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76e5b7c..25fc8b6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,9 +41,6 @@ devDependencies: '@iconify/utils': specifier: ^2.1.12 version: 2.1.12 - '@nuxt/devtools': - specifier: ^1.0.4 - version: 1.0.4(nuxt@3.8.2)(vite@4.5.0) '@types/fs-extra': specifier: ^11.0.4 version: 11.0.4 diff --git a/server/tsconfig.json b/server/tsconfig.json new file mode 100644 index 0000000..b9ed69c --- /dev/null +++ b/server/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../.nuxt/tsconfig.server.json" +}