Skip to content

arkrm/bionic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@arkrm/bionic

npm (scoped) GitHub issues GitHub forks GitHub stars GitHub license

服务于arkrm团队项目的 prettier eslint stylelint 的配置文件合集

stylelint 暂未实现

INSTALL

# install with yarn
yarn add @arkrm/bionic -D

# install with npm
npm i @arkrm/bionic -D

USEAGE

// .eslintrc.js
module.exports = {
  extends: [require.resolve("@arkrm/bionic/eslint/index")],
};

// .prettierrc.js
module.exports = require("@arkrm/bionic/prettier");

Tips

  • 适用于 umi 工程
  • 适用于 taro 工程,但要求 taro 版本为 3.x, 且上层框架为 react

VSCode config example

// .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"
}