Search Docs
npm add @empjs/eslint-config-react -D
{ "eslintConfig": { "extends": [ "@empjs/eslint-config-react" ] }, }
{ "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit", }, "typescript.tsdk": "node_modules/typescript/lib", "typescript.enablePromptUseWorkspaceTsdk": true, "eslint.probe": [ "javascript", "javascriptreact", "typescript", "typescriptreact", "html", "vue", "markdown", "json" ], "javascript.format.enable": false, "typescript.format.enable": false }
在vscode中,需要搭配VS Code ESLint extension使用,无需安装Prettier Formatter for Visual Studio Code。
vscode
VS Code ESLint extension
Prettier Formatter for Visual Studio Code