服务于arkrm团队项目的 prettier eslint stylelint 的配置文件合集
stylelint
暂未实现
# install with yarn
yarn add @arkrm/bionic -D
# install with npm
npm i @arkrm/bionic -D
// .eslintrc.js
module.exports = {
extends: [require.resolve("@arkrm/bionic/eslint/index")],
};
// .prettierrc.js
module.exports = require("@arkrm/bionic/prettier");
- 适用于
umi
工程 - 适用于 taro 工程,但要求
taro
版本为3.x
, 且上层框架为react
// .vscode/settings.json
{
"editor.tabSize": 2,
"npm.packageManager": "yarn",
"eslint.validate": ["javascript", "typescript", "typescriptreact"],
"eslint.packageManager": "yarn",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.packageManager": "yarn"
}