From d020ad1c4916dea6e0ba4ac5f98d19adc790f326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Ferrer=20Gonz=C3=A1lez?= Date: Wed, 15 Jan 2025 17:19:42 +0100 Subject: [PATCH] fix: improve readme docs (sorry for bumping a `fix` while it should be a `docs`, testing out the automated release process) (#28) --- README.md | 92 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index af45dfb..2366e62 100644 --- a/README.md +++ b/README.md @@ -29,54 +29,56 @@ 1. Install the dependency. -```bash -npm install --save-dev eslint-config-codely -``` + ```bash + npm install --save-dev eslint-config-codely + ``` 2. Add it to your `eslint.config.js`: -```js -import eslintConfigCodely from "eslint-config-codely"; - -export default [ - // If you're using js - ...eslintConfigCodely.js, - // Or if you're using ts. The ts config includes the js one, so you don't need to include it manually. - ...eslintConfigCodely.ts, - { - // Your config here - } -] -``` - -Also, you can use the `full` config, which includes the `js`, `ts` and very opinionated Codely configs. - -```js -import eslintConfigCodely from "eslint-config-codely"; - -export default [ - ...eslintConfigCodely.full, - { - // Your config here - } -] -``` - -We have a `course` setting. This is the same as the `full` config, but with a narrower width due to the zoom used in -videos: - -```js -import eslintConfigCodely from "eslint-config-codely"; - -export default [ - ...eslintConfigCodely.course, - { - // Your config here - } -] -``` - -ℹ️ Please note that some of the rules enabled by default require that you have `strict: true` in your `tsconfig.json`. + ```js + import eslintConfigCodely from "eslint-config-codely"; + + export default [ + // If you're using js + ...eslintConfigCodely.js, + // Or if you're using ts. The ts config includes the js one, so you don't need to include it manually. + ...eslintConfigCodely.ts, + { + // Your config here + } + ] + ``` + + Also, you can use the `full` config, which includes the `js`, `ts` and very opinionated Codely configs. + + ```js + import eslintConfigCodely from "eslint-config-codely"; + + export default [ + ...eslintConfigCodely.full, + { + // Your config here + } + ] + ``` + + We have a `course` setting. + This is the same as the `full` config, but with a narrower width due to the zoom used during +video recordings: + + ```js + import eslintConfigCodely from "eslint-config-codely"; + + export default [ + ...eslintConfigCodely.course, + { + // Your config here + } + ] + ``` + +> [!NOTE] +> Some rules enabled by default require `strict: true` to be set in your `tsconfig.json`. ## 🤔 What it does