diff --git a/packages/ESLintConfig/README.md b/packages/ESLintConfig/README.md index bca81d6..9a0c6d4 100644 --- a/packages/ESLintConfig/README.md +++ b/packages/ESLintConfig/README.md @@ -1,2 +1,29 @@ # ESLintConfig > The ESLint Config Be Used For AllJointNext + +## Usage +1. Installation +```sh +yarn add eslint prettier @alljoint-next/eslint-config --dev +# npm install eslint prettier @alljoint-next/eslint-config --save-dev +``` + +2. Setup Configuration +```sh +echo '{ "extends": "@alljoint-next" }' > .eslintrc.json +echo '!**/node_modules/** +!./node_modules/** +!**/.{git,svn,hg}/** +!./.{git,svn,hg}/**' > .eslintignore +``` + +3. Add Scripts +package.json +```json +{ + "scripts": { + "format": "prettier **/*.{js,json,md,yaml} --write && yarn lint --fix", + "lint": "eslint **/*.js" + } +} +``` diff --git a/packages/ESLintConfig/package.json b/packages/ESLintConfig/package.json index a630ae8..8b8126a 100644 --- a/packages/ESLintConfig/package.json +++ b/packages/ESLintConfig/package.json @@ -1,7 +1,7 @@ { "name": "@alljoint-next/eslint-config", "version": "0.1.0", - "description": "The ESLint Config Used For AllJointNext", + "description": "The ESLint Config Be Used For AllJointNext", "author": "TZU-YEN, CHANG ", "license": "GPL-3.0", "main": ".eslintrc.json",