Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint auto fix #1

Open
luneShaoGM opened this issue Mar 29, 2023 · 3 comments
Open

eslint auto fix #1

luneShaoGM opened this issue Mar 29, 2023 · 3 comments

Comments

@luneShaoGM
Copy link
Owner

luneShaoGM commented Mar 29, 2023

{
  // 每次保存自动格式化
  "editor.formatOnSave": true,
  // 每次保存的时候将代码按eslint格式进行修复
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  // js文件默认格式化方式 和vue中的js保持一致使用编辑器自带的ts格式
  "[javascript]": {
    // "editor.defaultFormatter": "vscode.typescript-language-features"
    // javascript文件默认格式化方式prettier
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  // json文件默认格式化方式prettier
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  // css文件默认格式化方式prettier
  "[css]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  // 控制折行方式 - "on" (根据视区宽度折行)
  "editor.wordWrap": "on",
  "editor.tabSize": 2, // 换行默认以tab缩进 2个字符
  "editor.colorDecorators": false, // 控制编辑器是否显示内联颜色修饰器和颜色选取器。
  "editor.snippetSuggestions": "top", // 将建议的代码段优先级提前选择,比如输入for第一个提示是for循环代码段。
  "files.associations": {
    // 文件关联语言的优先级配置
    "*.js": "javascriptreact",
    "*.vue": "vue",
    "*.cshtml": "html",
    "*.dwt": "html"
  },
  "files.autoSave": "onFocusChange",
  "editor.formatOnPaste": true,
  "window.zoomLevel": 0
}
@luneShaoGM
Copy link
Owner Author

path: .vscode/settings.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@luneShaoGM and others