Skip to content

Commit

Permalink
Add doc about lint ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
zoontek committed Jan 10, 2025
1 parent 06b263f commit 30228a2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <rule>: <optional-explanation>
```

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:
Expand Down

0 comments on commit 30228a2

Please sign in to comment.