# @wdcthemes/eslint-config

> A shareable ESLint configuration

Latest version **7.5.0** (published 2024-02-04) · GPL-2.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @wdcthemes/eslint-config
pnpm add @wdcthemes/eslint-config
yarn add @wdcthemes/eslint-config
bun add @wdcthemes/eslint-config
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.5.0 |
| Published | 2024-02-04 |
| First published | 2023-11-21 |
| Weekly downloads | 0 |
| License | GPL-2.0-or-later |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | ^16 \|\| >=18 |
| Dependencies | 16 |
| Unpacked size | 23.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Stefan Vasiljevic |
| Maintainers | stefanue |
| Keywords | eslint, eslint-config, wdc |

## Links

- npm: https://www.npmjs.com/package/@wdcthemes/eslint-config
- Repository: https://github.com/stefanue/wdc-toolkit
- Homepage: https://github.com/stefanue/wdc-toolkit/tree/develop/packages/eslint-config#readme
- Issues: https://github.com/stefanue/wdc-toolkit/issues
- npm.io page: https://npm.io/package/@wdcthemes/eslint-config

## Dependencies (16)

- [eslint](https://npm.io/package/eslint.md) ^8.40.0
- [prettier](https://npm.io/package/prettier.md) ^2.4.1
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.21.4
- [eslint-plugin-jest](https://npm.io/package/eslint-plugin-jest.md) ^27.2.1
- [eslint-plugin-jsdoc](https://npm.io/package/eslint-plugin-jsdoc.md) ^39.9.1
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.32.2
- [@babel/eslint-parser](https://npm.io/package/@babel/eslint-parser.md) ^7.21.3
- [eslint-config-airbnb](https://npm.io/package/eslint-config-airbnb.md) ^19.0.4
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.27.5
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) ^8.6.0
- [eslint-plugin-jsx-a11y](https://npm.io/package/eslint-plugin-jsx-a11y.md) ^6.7.1
- [eslint-plugin-prettier](https://npm.io/package/eslint-plugin-prettier.md) ^4.2.1
- [@wordpress/eslint-plugin](https://npm.io/package/@wordpress/eslint-plugin.md) ^14.9.0
- [eslint-config-airbnb-base](https://npm.io/package/eslint-config-airbnb-base.md) ^15.0.0
- [eslint-plugin-react-hooks](https://npm.io/package/eslint-plugin-react-hooks.md) ^4.6.0
- [@wdcthemes/babel-preset-default](https://npm.io/package/@wdcthemes/babel-preset-default.md) ^6.5.0

## 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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 7.5.0 (latest) — 2024-02-04
- 4.0.0-next.2 (next) — 2023-11-27
- 7.4.0 — 2023-12-08
- 7.3.0 — 2023-12-08
- 7.2.0 — 2023-12-08
- 7.1.0 — 2023-12-08
- 7.0.0 — 2023-11-27
- 6.0.0 — 2023-11-27
- 5.0.0 — 2023-11-27
- 4.0.0 — 2023-11-27
- 3.3.0 — 2023-11-22
- 3.2.0-next.1 — 2023-11-22
- 3.2.0 — 2023-11-22
- 3.2.0-next.0 — 2023-11-22
- 3.1.2 — 2023-11-21
- … 1 more at https://npm.io/package/@wdcthemes/eslint-config/versions

## README

# WDC Eslint Config


## Installation

Install [@wdcthemes/eslint-config](https://github.com/stefanue/wdc-toolkit/blob/master/packages/eslint-config/README.md) as a development dependency of your project:

```sh
npm install @wdcthemes/eslint-config --save-dev
```

## Available ESLint configs

### @wdcthemes/eslint-config

The default export contains common rules that are not specific to any framework or environment.

```js
// eslintrc.js
module.exports = {
	extends: ['@wdcthemes/eslint-config'],
};
```

### @wdcthemes/eslint-config/react

Extends `@wdcthemes/eslint-config` adding specific rules to React.

```js
// eslintrc.js
module.exports = {
	extends: ['@wdcthemes/eslint-config/react'],
};
```

### @wdcthemes/eslint-config/wordpress

Extends `@wdcthemes/eslint-config/react` adding the custom gutenberg rules from `@wordpress/eslint-plugin`.

*Note*: This is an optional dependency, if you want to use this set of rules you must install `@wordpress/eslint-plugin` first.

```bash
npm install --save-dev @wordpress/eslint-plugin
```

```js
// eslintrc.js
module.exports = {
	extends: ['@wdcthemes/eslint-config/wordpress'],
};
```

### @wdcthemes/eslint-config/node

Extends `@wdcthemes/eslint-config` adding specific rules to Node.js.

```js
// eslintrc.js
module.exports = {
	extends: ['@wdcthemes/eslint-config/node'],
};
```

### @wdcthemes/eslint-config/jest

Adds specific rules for the `jest` testing framework.

```js
// eslintrc.js
module.exports = {
	extends: ['@wdcthemes/eslint-config/react', '@wdcthemes/eslint-config/jest'],
};
```

### @wdcthemes/eslint-config/legacy

This legacy config contains only rules for ES5. It should be used for projects without babel that are still writing legacy JavaScript code.

```js
// eslintrc.js
module.exports = {
	extends: ['@wdcthemes/eslint-config/legacy'],
};
```

## Usage

In order to use this config, choose the one you want and add this configuration to your `package.json`:

```json
{
    "eslintConfig": {
        "extends": "@wdcthemes/eslint-config"
    }
}
```

Or add a `.eslintrc.js` file to your project root containing:
```js
module.exports = {
	extends: ['@wdcthemes/eslint-config'],
};
```

## TypeScript Support

If you want TypeScript support, make sure to install `@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser`

```sh
npm install --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser
```

change the eslint parser to `@typescript-eslint/parser` and add the typescript plugin

```js
// eslintrc.js
module.exports = {
	parser: '@typescript-eslint/parser',
	extends: ['@wdcthemes/eslint-config/react'],
	plugins: ['@typescript-eslint'],
}
```

## VSCode integration

We recommend turning on VSCode settings to automatically run `eslint --fix` on save.

```json
"editor.codeActionsOnSave": {
   "source.fixAll.eslint": true,
}
```

This will automagically format your code once you save. You don't need VSCode prettier extension enabled or running on save as eslint will automatically run `prettier` for you.

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