Skip to content

把平时喜欢的一些 eslint 代码规范整合到这个项目中,方便其他项目直接使用

Notifications You must be signed in to change notification settings

BestDingSheng/eslint-config-sh

Repository files navigation

eslint-config-sh

NPM download Code Style Prettier MIT License

介绍

把平时自己用的 eslint 代码规范整合到这个项目中,方便其他项目直接使用

install

1 进入到你的项目运行下面命令

npm install -save eslint-config-sh
npx install-peerdeps --dev eslint-config-sh

使用

JavaScrip

npm install --save-dev eslint babel-eslint eslint-plugin-babel eslint-plugin-import eslint-config-sh
{
  "root": true,
  "extends": "sh"
}

Typescript

npm install --save-dev eslint typescript  eslint-plugin-babel eslint-plugin-import @typescript-eslint/eslint-plugin eslint-config-sh
{
  "root": true,
  "extends": "sh/typescript"
}

React

npm install --save-dev eslint babel-eslint eslint-plugin-babel eslint-plugin-import eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y eslint-config-sh

{
  "root": true,
  "extends": "sh/react"
}

Vue

npm install --save-dev eslint babel-eslint eslint-plugin-babel eslint-plugin-import eslint-plugin-vue eslint-config-sh

{
  "root": true,
  "extends": "sh/vue"
}

项目依赖

  • "babel-eslint": "^10.1.0",
  • "eslint": "^7.23.0",
  • "eslint-config-airbnb": "^18.2.1",
  • "eslint-config-prettier": "^8.1.0",
  • "eslint-plugin-import": "^2.22.1",
  • "eslint-plugin-jsx": "^0.1.0",
  • "eslint-plugin-jsx-a11y": "^6.4.1",
  • "eslint-plugin-prettier": "^3.3.1",
  • "eslint-plugin-react": "^7.23.1",
  • "eslint-plugin-react-hooks": "^4.2.0",
  • "@typescript-eslint/eslint-plugin": "^5.10.1",
  • "@typescript-eslint/parser": "^5.10.1",
  • "eslint-plugin-vue": "^8.3.0",
  • "typescript": "^4.5.5"

About

把平时喜欢的一些 eslint 代码规范整合到这个项目中,方便其他项目直接使用

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published