Skip to content

Commit

Permalink
✏️ docs: 更新文档 | 增加.eslintignore,.prettierignore
Browse files Browse the repository at this point in the history
  • Loading branch information
AnyFork committed Jul 21, 2023
1 parent 9e49d54 commit d771f19
Show file tree
Hide file tree
Showing 14 changed files with 548 additions and 209 deletions.
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.sh
node_modules
*.md
*.woff
*.ttf
.vscode
dist
public
.husky
5 changes: 4 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ module.exports = {
plugins: ['vue'],
rules: {
// 关闭下面/// <reference path="..." />, /// <reference types="..." />, /// <reference lib="..." /> 校验
'@typescript-eslint/triple-slash-reference': 'off'
'@typescript-eslint/triple-slash-reference': 'off',
// 关闭Eslint 缩进校验规则
indent: 'off',
'@typescript-eslint/indent': 'error'
}
}
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
node_modules
**/*.svg
**/*.sh
1 change: 1 addition & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
singleQuote: true,
//避免报错delete (cr)的错
endOfLine: 'auto',
// 换行,always:超过printWidth就换行,never:不换行,preserve:按照原样处理
proseWrap: 'always',
// 不加分号
semi: false,
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}
34 changes: 32 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,36 @@
// code代码保存时,自动eslint修复
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"eslint.autoFixOnSave" : true
}
"eslint.autoFixOnSave": true
},
//prettier可以格式化很多种格式,所以需要在这里对应配置下
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
//这个设置在ctrl+s的时候,会启用默认的格式化,这里是prettier
"editor.formatOnSave": true
}
9 changes: 3 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
## <small>0.0.1 (2023-07-20)</small>

* ✨ feat: 增加Eslint和perttier配置 ([99484f6](https://github.com/AnyFork/vite-standard-template/commit/99484f6))
* 🎉 init: 项目初始化 ([3a026c9](https://github.com/AnyFork/vite-standard-template/commit/3a026c9))
* Initial commit ([dc86fcc](https://github.com/AnyFork/vite-standard-template/commit/dc86fcc))



- ✨ feat: 增加Eslint和perttier配置 ([99484f6](https://github.com/AnyFork/vite-standard-template/commit/99484f6))
- 🎉 init: 项目初始化 ([3a026c9](https://github.com/AnyFork/vite-standard-template/commit/3a026c9))
- Initial commit ([dc86fcc](https://github.com/AnyFork/vite-standard-template/commit/dc86fcc))
Loading

0 comments on commit d771f19

Please sign in to comment.