# eslint-with-prettier

> Recommended way (Needs global package [install-peerdeps](https://www.npmjs.com/package/install-peerdeps)): ```shell install-peerdeps eslint-with-prettier -D ``` ## Integration ### ESLint Configuration It's recommended to use .cjs file type for .esli

Latest version **2.1.2** (published 2024-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-with-prettier
pnpm add eslint-with-prettier
yarn add eslint-with-prettier
bun add eslint-with-prettier
```

## 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 | 2.1.2 |
| Published | 2024-03-31 |
| First published | 2023-12-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ufuk Bakan |
| Maintainers | ufukbakan |
| Keywords | eslint-with-prettier, eslint, prettier, combined, plugin, react, javascript, format, code, lint |

## Links

- npm: https://www.npmjs.com/package/eslint-with-prettier
- Repository: https://github.com/ufukbakan/eslint-with-prettier
- Homepage: https://github.com/ufukbakan/eslint-with-prettier#readme
- Issues: https://github.com/ufukbakan/eslint-with-prettier/issues
- npm.io page: https://npm.io/package/eslint-with-prettier

## 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

- 2.1.2 (latest) — 2024-03-31
- 2.1.1 — 2023-12-29
- 2.1.0 — 2023-12-29
- 2.0.1 — 2023-12-29
- 2.0.0 — 2023-12-28
- 1.1.3 — 2023-12-28
- 1.1.2 — 2023-12-28
- 1.1.1 — 2023-12-28
- 1.1.0 — 2023-12-28
- 1.0.1 — 2023-12-28
- 1.0.0 — 2023-12-28

## README

# eslint-with-prettier
## Installation
Recommended way (Needs global package [install-peerdeps](https://www.npmjs.com/package/install-peerdeps)):
```shell
install-peerdeps eslint-with-prettier -D
```
## Integration
### ESLint Configuration
It's recommended to use .cjs file type for .eslintrc
```cjs
const { configure } = require("eslint-with-prettier");

module.exports = {
    ...configure("js", "react", "prettier"),
    // your other eslint configurations (you may dont want to override configured values, so you can inspect output of configure method by logging in any js file)
}
```

You can customize prettier via your project's .prettierrc file

### package.json
This configuration has dependencies to ```husky``` and ```lint-staged```.

The following package.json content is a good practice for linting before committing any file.

```json
  "scripts": {
    "lint": "lint-staged",
    "prepare": "husky install && husky add .husky/pre-commit \"npm run lint\""
  },
  "lint-staged": {
    "*.js": [
      "eslint --fix",
      "eslint"
    ],
    "*.jsx": [
      "eslint --fix",
      "eslint"
    ],
    "*.ts": [
      "eslint --fix",
      "eslint"
    ],
    "*.tsx": [
      "eslint --fix",
      "eslint"
    ]
  },
```

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