-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c3dbbc
commit fd6ce27
Showing
49 changed files
with
1,821 additions
and
929 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
insert_final_newline = false | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,55 @@ | ||
process.env.ESLINT_TSCONFIG = 'tsconfig.json' | ||
// .eslintrc.js | ||
|
||
process.env.ESLINT_TSCONFIG = 'tsconfig.json'; | ||
|
||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true | ||
es2022: true | ||
}, | ||
extends: [ | ||
'plugin:prettier/recommended', | ||
'plugin:vue/vue3-recommended', | ||
'plugin:vue/recommended', // Changed to support Vue 2 and Vue 3 | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:nuxt/recommended', | ||
"plugin:tailwindcss/recommended", | ||
"@antfu" | ||
'plugin:tailwindcss/recommended' | ||
], | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
ecmaVersion: 2023, // Updated ECMAScript version | ||
parser: '@typescript-eslint/parser', | ||
sourceType: 'module' | ||
}, | ||
plugins: ['@typescript-eslint', 'tailwindcss'], | ||
rules: { | ||
'vue/multi-word-component-names': 0, //关闭vue文件和组件命名校验 | ||
indent: ['error', 4], | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'tailwindcss/no-custom-classname': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'vue/multi-word-component-names': 0, | ||
'vue/singleline-html-element-content-newline': 'off', | ||
'vue/multiline-html-element-content-newline': 'off', | ||
'vue/max-attributes-per-line': 0, | ||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn', | ||
'prettier/prettier': [ | ||
'no-console': 'off', | ||
'no-debugger': 'off', | ||
// Remove conflicting rules with Prettier | ||
'prettier/prettier': 'off', | ||
'vue/html-indent': [ | ||
'error', | ||
4, | ||
{ | ||
printWidth: 140, //代码单行长度 | ||
tabWidth: 4, //tab键缩进为2空格 | ||
useTabs: false, //使用空格缩进 | ||
singleQuote: true, //js单引号 | ||
semi: false, //去分号 | ||
// trailingComma: 'none', //无尾逗号 | ||
arrowParens: 'avoid', //箭头函数尽可能省略括号 | ||
jsxBracketSameLine: true //标签换行后>单独一行 | ||
attribute: 1, | ||
baseIndent: 1, | ||
closeBracket: 0, | ||
alignAttributesVertically: true, | ||
ignores: [] | ||
} | ||
] | ||
}, | ||
settings: { | ||
tailwindcss: { | ||
includeLanguages: ['html', 'vue', 'js', 'jsx', 'tsx'] // Specify which file types Tailwind CSS should be checked against | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
/*打印宽度,超过后,会将属性换行*/ | ||
printWidth: 120, | ||
/*禁止使用尾随逗号,对象和数组最后一个逗号去掉*/ | ||
trailingComma: 'none', | ||
/*在对象字面量中的括号之间添加空格*/ | ||
bracketSpacing: true, | ||
/*使用单引号而不是双引号来定义字符串*/ | ||
singleQuote: true, | ||
/*当箭头函数只有一个参数时,省略参数前后的括号*/ | ||
arrowParens: 'avoid', | ||
/*script和style标签中间的内容缩进*/ | ||
vueIndentScriptAndStyle: true, | ||
// 将>多行 HTML(HTML、JSX、Vue、Angular)元素放在最后一行的末尾,而不是单独放在下一行(不适用于自闭合元素 | ||
bracketSameLine: true, | ||
tabWidth: 4 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,65 +8,72 @@ | |
* | ||
* Copyright (c) 2023 by 15257184434 [email protected], All Rights Reserved. | ||
*/ | ||
import { defineNuxtConfig } from 'nuxt/config' | ||
import { defineNuxtConfig } from 'nuxt/config'; | ||
|
||
export default defineNuxtConfig({ | ||
srcDir: 'src/', | ||
build: { | ||
transpile: ['dayjs'], | ||
}, | ||
components: [ | ||
{ | ||
path: '@/components/public', | ||
extensions: ['.vue'], | ||
srcDir: 'src/', | ||
build: { | ||
transpile: ['dayjs'] | ||
}, | ||
], | ||
runtimeConfig: { | ||
public: { | ||
apiBaseUrl: process.env.NUXT_PUBLIC_API_BASE_URL | ||
}, | ||
}, | ||
modules: ['@pinia/nuxt', '@vueuse/nuxt', '@nuxtjs/tailwindcss'], | ||
css: ['~/assets/styles/init.css'], | ||
app: { | ||
head: { | ||
charset: 'utf-8', | ||
title: 'Gao Blog', | ||
meta: [ | ||
{ name: 'description', content: '高江华的博客' }, | ||
{ name: 'author', content: '高江华, [email protected]' }, | ||
{ name: 'keywords', content: '高江华, 博客, vue, react, nuxt, next, nest, uniapp, 小程序, app, html, js, css, scss, less' }, | ||
{ name: 'robots', content: 'index,follow' }, | ||
{ name: 'viewport', content: 'initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no' }, | ||
{ name: 'apple-mobile-web-app-title', content: '高江华的博客' }, | ||
{ name: 'apple-mobile-web-app-capable', content: 'yes' }, | ||
{ name: 'renderer', content: 'webkit' }, | ||
{ name: 'HandheldFriendly', content: 'true' }, | ||
{ name: 'generator', content: 'VsCode Nuxt3' }, | ||
{ name: 'copyright', content: '高江华' }, | ||
{ name: 'revisit-after', content: '7 days' }, | ||
{ name: 'cache-control', content: 'no-cache' }, | ||
{ name: 'x-dns-prefetch-control', content: 'on' }, | ||
{ name: 'og:type', content: 'website' }, | ||
{ name: 'og:url', content: 'https://docs.gaojianghua.cn' }, | ||
{ name: 'og:title', content: 'Wolffy-Document' }, | ||
{ name: 'og:image', content: 'https://gaojianghua.oss-cn-hangzhou.aliyuncs.com/home/%E7%81%B0%E5%A4%AA%E7%8B%BC.png' }, | ||
{ | ||
name: 'og:description', | ||
content: | ||
'技术博客--前端后端运维知识点收录: Vue, React, Taro, ReactNative, Webpack, Vite, UniApp, 小程序, H5, Docker, Git, GoLang, Node, Nest, Mysql, Redis, 数据结构, 算法', | ||
}, | ||
], | ||
link: [ | ||
{ rel: 'icon', type: 'image/svg+xml', href: 'https://blog-cli.oss-cn-hangzhou.aliyuncs.com/logo.ico'}, | ||
{ rel: 'dns-prefetch', href: 'https://blog-cli.oss-cn-hangzhou.aliyuncs.com' }, | ||
{ rel: 'dns-prefetch', href: 'https://docs.gaojianghua.cn' } | ||
], | ||
script: [ | ||
components: [ | ||
{ | ||
src: 'https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/svg_28150_11.961f67029185d625b7656c914468febb.js' | ||
path: '@/components/public', | ||
extensions: ['.vue'] | ||
} | ||
], | ||
runtimeConfig: { | ||
public: { | ||
apiBaseUrl: process.env.NUXT_PUBLIC_API_BASE_URL | ||
} | ||
] | ||
}, | ||
}, | ||
}) | ||
modules: ['@pinia/nuxt', '@vueuse/nuxt', '@nuxtjs/tailwindcss'], | ||
css: ['~/assets/styles/init.css'], | ||
app: { | ||
head: { | ||
charset: 'utf-8', | ||
title: 'Gao Blog', | ||
meta: [ | ||
{ name: 'description', content: '高江华的博客' }, | ||
{ name: 'author', content: '高江华, [email protected]' }, | ||
{ | ||
name: 'keywords', | ||
content: | ||
'高江华, 博客, vue, react, nuxt, next, nest, uniapp, 小程序, app, html, js, css, scss, less' | ||
}, | ||
{ name: 'robots', content: 'index,follow' }, | ||
{ name: 'viewport', content: 'initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no' }, | ||
{ name: 'apple-mobile-web-app-title', content: '高江华的博客' }, | ||
{ name: 'apple-mobile-web-app-capable', content: 'yes' }, | ||
{ name: 'renderer', content: 'webkit' }, | ||
{ name: 'HandheldFriendly', content: 'true' }, | ||
{ name: 'generator', content: 'VsCode Nuxt3' }, | ||
{ name: 'copyright', content: '高江华' }, | ||
{ name: 'revisit-after', content: '7 days' }, | ||
{ name: 'cache-control', content: 'no-cache' }, | ||
{ name: 'x-dns-prefetch-control', content: 'on' }, | ||
{ name: 'og:type', content: 'website' }, | ||
{ name: 'og:url', content: 'https://docs.gaojianghua.cn' }, | ||
{ name: 'og:title', content: 'Wolffy-Document' }, | ||
{ | ||
name: 'og:image', | ||
content: 'https://gaojianghua.oss-cn-hangzhou.aliyuncs.com/home/%E7%81%B0%E5%A4%AA%E7%8B%BC.png' | ||
}, | ||
{ | ||
name: 'og:description', | ||
content: | ||
'技术博客--前端后端运维知识点收录: Vue, React, Taro, ReactNative, Webpack, Vite, UniApp, 小程序, H5, Docker, Git, GoLang, Node, Nest, Mysql, Redis, 数据结构, 算法' | ||
} | ||
], | ||
link: [ | ||
{ rel: 'icon', type: 'image/svg+xml', href: 'https://blog-cli.oss-cn-hangzhou.aliyuncs.com/logo.ico' }, | ||
{ rel: 'dns-prefetch', href: 'https://blog-cli.oss-cn-hangzhou.aliyuncs.com' }, | ||
{ rel: 'dns-prefetch', href: 'https://docs.gaojianghua.cn' } | ||
], | ||
script: [ | ||
{ | ||
src: 'https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/svg_28150_11.961f67029185d625b7656c914468febb.js' | ||
} | ||
] | ||
} | ||
} | ||
}); |
Oops, something went wrong.