# eslint-config-berkekaragoz-react

> ESLint React configuration aimed to have balanced aspects.

Latest version **1.0.2** (published 2024-12-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-config-berkekaragoz-react
pnpm add eslint-config-berkekaragoz-react
yarn add eslint-config-berkekaragoz-react
bun add eslint-config-berkekaragoz-react
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2024-12-02 |
| First published | 2022-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | E. Berke Karagöz |
| Maintainers | berkekaragoz |
| Keywords | eslint, eslintconfig |

## Links

- npm: https://www.npmjs.com/package/eslint-config-berkekaragoz-react
- Repository: https://github.com/BerkeKaragoz/eslint-config
- Homepage: https://github.com/BerkeKaragoz/eslint-config#readme
- Issues: https://github.com/BerkeKaragoz/eslint-config/issues
- npm.io page: https://npm.io/package/eslint-config-berkekaragoz-react

## Dependencies (2)

- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.29.4
- [eslint-plugin-react-hooks](https://npm.io/package/eslint-plugin-react-hooks.md) ^5.0.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
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2024-12-02
- 1.0.1 — 2024-12-02
- 1.0.0 — 2024-12-01
- 0.2.1 — 2022-06-12
- 0.2.0 — 2022-04-30
- 0.1.5 — 2022-04-26
- 0.1.4 — 2022-04-26
- 0.1.3 — 2022-04-25
- 0.1.2 — 2022-04-25
- 0.1.1 — 2022-04-25
- 0.1.0 — 2022-04-24
- 0.0.0 — 2022-04-24

## README

Install:

- NPM: `npm i -D eslint-config-berkekaragoz-react`
- Yarn: `yarn add -D eslint-config-berkekaragoz-react`
- PNPM: `pnpm i -D eslint-config-berkekaragoz-react`

# eslint-config-berkekaragoz-react

ESLint React configuration aimed to have balanced aspects. A part of [eslint-config-berkekaragoz](https://www.npmjs.com/package/eslint-config-berkekaragoz).

## Usage

```yaml
extends:
  - berkekaragoz-react
```

### VSCode Settings

```json
{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "indentRainbow.ignoreErrorLanguages": ["*"],
  "indentRainbow.colorOnWhiteSpaceOnly": true
}
```

## Contents:

ESLint configs:

- `berkekaragoz-react`
- `berkekaragoz-react/formatting`

`berkekaragoz-react` contents:

```js
{
  env: { browser: true, es2021: true },
  extends: [
    "plugin:react/recommended",
    "plugin:react/jsx-runtime",
    "plugin:react-hooks/recommended",
  ],
  parserOptions: {
    ecmaFeatures: { jsx: true },
    ecmaVersion: "latest",
    sourceType: "module",
  },
  settings: { react: { version: "detect" } },
  plugins: ["react"],
  rules: {
    "react/boolean-prop-naming": [
      "warn",
      { propTypeNames: ["bool", "mutuallyExclusiveTrueProps"] },
    ],
    "react/destructuring-assignment": ["warn", "always"],
    "react/forbid-dom-props": [
      "warn",
      {
        forbid: [
          {
            propName: "style",
            message: "Use the prop 'style' only for debugging.",
          },
        ],
      },
    ],
    "react/function-component-definition": [
      "warn",
      {
        namedComponents: "arrow-function",
        unnamedComponents: "arrow-function",
      },
    ],
    "react/hook-use-state": "warn",
    "react/prop-types": "off",
    "react/no-invalid-html-attribute": "error",
    "react/no-multi-comp": ["warn", { ignoreStateless: true }],
    "react/self-closing-comp": "warn",
    "react/void-dom-elements-no-children": "error",
    "react/jsx-filename-extension": [ "warn", { extensions: [".tsx", ".jsx"] }],
    "react/jsx-sort-props": [
      "warn",
      {
        callbacksLast: true,
        shorthandFirst: true,
        multiline: "last",
        reservedFirst: ["key", "ref"],
      },
    ],
  },
};
```

Related:

- [eslint-config-berkekaragoz](https://www.npmjs.com/package/eslint-config-berkekaragoz)
- [eslint-config-berkekaragoz-suggestions](https://www.npmjs.com/package/eslint-config-berkekaragoz-suggestions)
- [eslint-config-berkekaragoz-formatting](https://www.npmjs.com/package/eslint-config-berkekaragoz-formatting)

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