@404-software/eslint-config 中文文档教程
1- 运行 yarn add -D @404web/eslint-config eslint prettier && yarn 全局添加 eslint
2- 将此添加到项目根
"eslintConfig": { "extends": "@404web/eslint-config" }
中的 package.json
3- 安装 eslint 和 prettier VS 代码扩展
4- 打开 VS Code 用户设置并添加以下内容
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript", "typescript", "javascriptreact", "typescriptreact"]
注意:要检查所有项目文件,请运行 eslint。 --ext .ts --ext .tsx --fix
1- Run yarn add -D @404web/eslint-config eslint prettier && yarn global add eslint
2- Add this to the package.json
in the project's root
"eslintConfig": { "extends": "@404web/eslint-config" }
3- Install eslint and prettier VS Code Extentions
4- Open VS Code user settings and add the following
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript", "typescript", "javascriptreact", "typescriptreact"]
Note: To lint all the project files, run eslint . --ext .ts --ext .tsx --fix