Skip to content

Commit

Permalink
feat: update package and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
VicSolWang committed Dec 23, 2021
1 parent 6fb2d05 commit dfc4fe5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
# eslint-config-wzx-react

[![NPM version](https://img.shields.io/npm/v/eslint-config-wzx-react)](https://www.npmjs.com/package/eslint-config-wzx-react)
[![node](https://img.shields.io/node/v/eslint-config-wzx-react)](https://nodejs.org)
[![Build Status](https://travis-ci.com/VicSolWang/eslint-config-wzx-react.svg?branch=master)](https://travis-ci.com/VicSolWang/eslint-config-wzx-react)
[![codecov](https://codecov.io/gh/VicSolWang/eslint-config-wzx-react/branch/master/graph/badge.svg)](https://codecov.io/gh/VicSolWang/eslint-config-wzx-react)
[![NPM downloads](https://img.shields.io/npm/dt/eslint-config-wzx-react)](https://www.npmjs.com/package/eslint-config-wzx-react)
[![NPM version](https://img.shields.io/npm/v/eslint-config-wzx-react?logo=npm&style=flat-square)](https://www.npmjs.com/package/eslint-config-wzx-react)
[![node](https://img.shields.io/node/v/eslint-config-wzx-react?logo=nodedotjs&style=flat-square)](https://nodejs.org)
[![Code Style](https://img.shields.io/badge/code%20style-prettier-ff69b4?logo=prettier&style=flat-square)](https://prettier.io)
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/VicSolWang/eslint-config-wzx-react/test-release-ci/master?logo=github&style=flat-square)](https://github.com/VicSolWang/eslint-config-wzx-react/actions/workflows/test-release.yml)
[![release](https://img.shields.io/badge/release-semantic--release-e10079?logo=semantic-release&style=flat-square)](https://github.com/semantic-release/semantic-release)
[![codecov](https://img.shields.io/codecov/c/gh/VicSolWang/eslint-config-wzx-react/master?label=codecov&logo=codecov&style=flat-square)](https://codecov.io/gh/VicSolWang/eslint-config-wzx-react)
[![NPM downloads](https://img.shields.io/npm/dt/eslint-config-wzx-react?style=flat-square)](https://www.npmjs.com/package/eslint-config-wzx-react)

The custom react eslint rules based on [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb). (Support Typescript Eslint)
> The custom react eslint rules based on [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb). (Support Typescript Eslint)
# Installation
## :cd: Installation

npm install --save-dev eslint-config-wzx-react

Note: Typescript eslint needs to install [typescript](https://www.npmjs.com/package/typescript), [@typescript-eslint/parser](https://www.npmjs.com/package/@typescript-eslint/parser), [@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin).
:bulb: Typescript eslint needs to install [typescript](https://www.npmjs.com/package/typescript), [@typescript-eslint/parser](https://www.npmjs.com/package/@typescript-eslint/parser), [@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin).

npm install --save-dev typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin

# Usage
## :rocket: Usage

Add eslint-config-wzx-react to the "extends" in your `.eslintrc.* file`.

{
"extends": "wzx-react"
}

Note: Typescript eslint needs `tsconfig.json` in your project root directory.
:bulb: Typescript eslint needs `tsconfig.json` in your project root directory.

# License
## :lock: License

[MIT](LICENSE).
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"cover:report": "nyc report --reporter=text-lcov > coverage.lcov",
"husky:pre-commit": "husky add .husky/pre-commit \"npx lint-staged\"",
"husky:commit-msg": "husky add .husky/commit-msg \"npx --no-install commitlint --edit $1\"",
"prepare": "husky install && npm run husky:pre-commit && npm run husky:commit-msg"
"husky:init": "husky install && npm run husky:pre-commit && npm run husky:commit-msg",
"prepare": "is-ci || npm run husky:init"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -43,7 +44,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.27.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0"
},
"peerDependencies": {
Expand All @@ -57,7 +58,9 @@
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"ava": "^3.15.0",
"fs-extra": "^10.0.0",
"husky": "^7.0.4",
"is-ci": "^3.0.1",
"lint-staged": "^12.1.3",
"nyc": "^15.1.0",
"prettier": "^2.5.1",
Expand Down

0 comments on commit dfc4fe5

Please sign in to comment.