From 0c40fe3df5fbbb209707fa9963567f706f0d428c Mon Sep 17 00:00:00 2001 From: "TZU-YEN, CHANG" Date: Sun, 23 Feb 2020 16:59:59 +0800 Subject: [PATCH] docs(eslint-config-typescript): add the usage section of README.md --- packages/ESLintConfig/README.md | 27 +++++++++++++++++++++++++++ packages/ESLintConfig/package.json | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) 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",