Open isayme opened 3 years ago
utf-8
lf
相关目标: 1, 2, 3, 4, 5
1, 2, 3, 4, 5
见 https://github.com/isayme/editorconfig/blob/master/.editorconfig
相关目标: 2, 3, 4, 5
2, 3, 4, 5
见 http://github.com/isayme/prettier-config 使用方法: 在 Prettier 的配置文件中直接填"@isayme/prettier-config", 注意其中使用的是双引号.
相关目标: 7, 8
7, 8
见: https://github.com/isayme/eslint-config ESLint 配置需要根据实际场景, 基础配置是:
extends: ['prettier']
相关目标: 6, 7, 8
6, 7, 8
// setting.json 配置 "editor.formatOnSave": false, "editor.codeActionsOnSave": [ "source.fixAll.format", "source.fixAll.eslint" ]
如果发现没有自动格式化, 试试加上配置:
"eslint.validate": [ "javascript", "javascriptreact", "typescript", "typescriptreact" ]
需要安装 VS Code 插件: EditorConfig, Prettier, ESLint, Format Code Action.
目标风格
utf-8
编码;lf
作为换行符;EditorConfig 配置
见 https://github.com/isayme/editorconfig/blob/master/.editorconfig
Prettier 配置
见 http://github.com/isayme/prettier-config 使用方法: 在 Prettier 的配置文件中直接填"@isayme/prettier-config", 注意其中使用的是双引号.
ESLint 配置
见: https://github.com/isayme/eslint-config ESLint 配置需要根据实际场景, 基础配置是:
VS Code 配置
如果发现没有自动格式化, 试试加上配置:
需要安装 VS Code 插件: EditorConfig, Prettier, ESLint, Format Code Action.