diff --git a/README.md b/README.md index c538b659e..719675b21 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,29 @@ You can also configure `lint-staged` as a pre-commit hook by running the followi $ pnpm configure-hooks ``` +### Ignore code + +If you want to ignore a lint rule for a specific line of the code, you can add a suppression comment above the line that emits the lint diagnostic: + +```ts +// biome-ignore : +``` + +For example: + +```ts +// biome-ignore lint/suspicious/noNamespace: +namespace foo {} +``` + +For `useExhaustiveDependencies` (equivalent of `react-hooks/exhaustive-deps`), you can even specify which dependencies are ignored: + +```ts +// biome-ignore lint/correctness/useExhaustiveDependencies(fn): +// biome-ignore lint/correctness/useExhaustiveDependencies(value): +useEffect(fn, [fn, value]); +``` + ## Generate Fluent icons Add the name of the desired icon in `scripts/fluent-icons/icons.json` using the format `icon-name-{filled|regular}`, and run the following command: