> ## Documentation Index
> Fetch the complete documentation index at: https://docs.commonality.co/llms.txt
> Use this file to discover all available pages before exploring further.

# ESLint

### Check that a package extends a base .eslintrc.json

You might find that your project has groups of packages that require similar configuration.
Use checks to create ensure they extend a common base configuration or have specific properties.

Create custom checks for your project by using the [commonality-checks-recommended](https://github.com/commonalityco/commonality/tree/main/packages/commonality-checks-recommended) package.

```ts .commonality/extends-eslint-next theme={null}
import { hasJsonFile } from 'commonality-checks-recommended';

export default hasJsonFile('.eslintrc.json', {
  extends: ['@eslint-config/next'],
});
```

```ts .commonality/extends-eslint-react theme={null}
import { hasJsonFile } from 'commonality-checks-recommended';

export default hasJsonFile('.eslintrc.json', {
  extends: ['@eslint-config/react'],
});
```

Selectively apply them to groups of packages in your project using [selectors](/selectors).

```json .commonality/config.json theme={null}
{
  "checks": [
    "ui": [
      "extends-eslint-react"
    ],
    "application": [
      "extends-eslint-next"
    ]
  ]
}
```
