Skip to content

Commit

Permalink
添加代码检查,并修复代码保存时不自动格式化代码的问题:
Browse files Browse the repository at this point in the history
参考:microsoft/vscode#108447 (comment)

File -> Preferences -> Settings (for Windows)
Code -> Preferences -> Settings (for Mac)

Search for "Default Formatter". In the dropdown, prettier will show as esbenp.prettier-vscode.
  • Loading branch information
fei yang committed Nov 18, 2020
1 parent b4c3b3a commit 98456fc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,10 @@
module.exports = {
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module"
},
rules: {
"no-console": "off",
"no-debugger": "off",
}
};
8 changes: 8 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,8 @@
{
"editor.fontSize": 14,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
}

0 comments on commit 98456fc

Please sign in to comment.