From b088cfadcea129388a99761350ff35d6bcdb824b Mon Sep 17 00:00:00 2001 From: Nelson Martell Date: Wed, 11 Oct 2023 14:11:59 -0500 Subject: [PATCH] docs(readme): add install and usage instructions --- README.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bfd9345..f702373 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,57 @@ # @joinnus-team/eslint-config -Shared ESlint configurations for Joinnus organization. +[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/joinnusteam/JARCH-eslint-config) +![npm (scoped with tag)](https://img.shields.io/npm/v/%40joinnus-team/eslint-config/latest) + +Set of shared ESLint-opinionated configurations for the Joinnus organization. + +## Installing + +```sh +yarn add -D @joinnus-team/eslint-config +``` + +Or: + +```sh +npm add -D @joinnus-team/eslint-config +``` + +> Make sure `peerDependencies` are installed (npm >= 7 do this automatically). + +## Usage + +### ESLint config + +In your `.eslintrc.json`: + +```json +{ + "extends": "@joinnus-team/eslint-config/{preset}" +} +``` + +Where `{preset}` is one of the [available presets](#available-presets-for-eslint). + +> Check out the [ESLint documentation](https://eslint.org/docs/latest/extend/shareable-configs#using-a-shareable-config) other formats to use shared configurations and override some configs. + +### Prettier config + +You also need to use the related prettier configuration. + +In your `.prettierrc.json`: + +```json +"@joinnus-team/eslint-config/default-prettier-config" +``` + +## Available presets for ESLint + +The default export from this package offers rules for Node.js 16 and up. Other available presets are: + +- `node-erbium`: For Node.js 12 applications. +- `node-fermium` For Node.js 14 applications. +- `node-gallium` For Node.js 16 applications. ## Contributing guidelines