# @chanzuckerberg/eslint-plugin-eds

> Shared React [ESLint](https://eslint.org/) plugin and config for CZI's Education Design System.

Latest version **1.0.2** (published 2023-03-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @chanzuckerberg/eslint-plugin-eds
pnpm add @chanzuckerberg/eslint-plugin-eds
yarn add @chanzuckerberg/eslint-plugin-eds
bun add @chanzuckerberg/eslint-plugin-eds
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-03-03 |
| First published | 2023-02-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | muggleborn, tzchang, booc0mtaco, girishczi, drater, jinlee93, ahuth, anniehu |
| Keywords | eslint, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/@chanzuckerberg/eslint-plugin-eds
- Repository: https://github.com/chanzuckerberg/frontend-libs
- Homepage: https://github.com/chanzuckerberg/frontend-libs/blob/main/packages/eslint-plugin-eds
- Issues: https://github.com/chanzuckerberg/frontend-libs/issues
- npm.io page: https://npm.io/package/@chanzuckerberg/eslint-plugin-eds

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2023-03-03
- 1.0.1 — 2023-02-23
- 1.0.0 — 2023-02-23

## README

# @chanzuckerberg/eslint-plugin-eds

Shared React [ESLint](https://eslint.org/) plugin and config for CZI's Education Design System.

## Prerequisites

1. [EDS](https://github.com/chanzuckerberg/edu-design-system) is in use
2. [Install ESLint](https://eslint.org/docs/latest/user-guide/getting-started#installation-and-usage)
3. Run ESLint on CI (e.g. `npx eslint .`)
4. Consider running ESLint [in your editor(s)](https://eslint.org/docs/latest/user-guide/integrations).

## Installation

Install by running

```sh
yarn add --dev @chanzuckerberg/eslint-plugin-eds
```

## Usage

Add this package as a plugin in your [eslint configuration file](https://eslint.org/docs/latest/user-guide/configuring/configuration-files).

```jsonc
// .eslintrc.json
{
  "plugins": ["@chanzuckerberg/eds"]
}
```

Then extend the recommended config.

```js
// .eslintrc
{
  "extends": [
    "plugin:@chanzuckerberg/eslint-plugin-eds/recommended"
  ]
}
```

## Custom rules

### no-h-tags

Don't allow `<h1>` - `<h6>` tags in components in favor of EDS `<Heading>` component.

```jsx
<h1>Bad Heading</h1> // <- Violation
<Heading size="h1">EDS Heading</Heading> // <- Good
```

### no-p-tags

Don't allow `<p>` tags in components in favor of EDS `<Text>` component.

```jsx
<p>Bad block text</p> // <- Violation
<Text>EDS Text</Text> // <- Good
```

---
_Source: https://npm.io/package/@chanzuckerberg/eslint-plugin-eds · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
