# @ouc/eslint-config

> OUC eslint config

Latest version **10.0.3** (published 2024-08-28) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 10.0.3 |
| Published | 2024-08-28 |
| First published | 2020-08-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=20.0.0 |
| Dependencies | 0 |
| Unpacked size | 25.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | __dheller__, mk-gentleman, oucm, o.dimarco, oucte, ojanssen |

## Links

- npm: https://www.npmjs.com/package/@ouc/eslint-config
- npm.io page: https://npm.io/package/@ouc/eslint-config

## Recent versions

- 10.0.3 (latest) — 2024-08-28
- 10.0.2 — 2024-08-28
- 10.0.1 — 2024-03-27
- 10.0.0 — 2024-03-27
- 9.0.2 — 2023-11-21
- 9.0.1 — 2023-11-08
- 9.0.0 — 2023-11-08
- 8.0.1 — 2023-08-02
- 8.0.0 — 2023-06-07
- 7.7.1 — 2023-05-31
- 7.7.0 — 2023-05-31
- 7.6.0 — 2023-05-24
- 7.5.2 — 2023-04-05
- 7.5.0 — 2023-04-04
- 7.4.0 — 2023-03-02
- … 28 more at https://npm.io/package/@ouc/eslint-config/versions

## README

# @ouc/eslint-config

This is the ESLint config of @OUC

## Dependencies

This config is based on [eslint-config-airbnb-typescript](https://github.com/iamturns/eslint-config-airbnb-typescript).

## Installing it

In your new project, do:

```bash
npm i --save-dev    @ouc/eslint-config \
                    @typescript-eslint/eslint-plugin@7 \
                    @typescript-eslint/parser@7 \
                    @commitlint/cli@19 \
                    @commitlint/config-conventional@19 \
                    husky@9 \
                    eslint@8 \
                    eslint-config-airbnb@19 \
                    eslint-config-airbnb-typescript@18 \
                    eslint-config-async@2 \
                    eslint-config-prettier@9 \
                    eslint-import-resolver-typescript@3 \
                    eslint-plugin-es5@1 \
                    eslint-plugin-es-x@8 \
                    eslint-plugin-import@2 \
                    eslint-plugin-ie11@1 \
                    eslint-plugin-jsx-a11y@6 \
                    eslint-plugin-prettier@5 \
                    eslint-plugin-react@7 \
                    eslint-plugin-react-hooks@4 \
                    prettier@3 \
                    scriptlint@3 \
                    typescript@5 \
                    npm-run-all@4
```

Create the following files in your new project:

### .eslintrc.js

```js
module.exports = {
  extends: ["@ouc/eslint-config"],
  parserOptions: {
    project: "./tsconfig.eslint.json",
  },
};
```

### .eslintignore

```bash
node_modules
dist
volumes
# and whatever else you might want to exclude that has JS/TS files inside
```

### .prettierrc.js

```js
const config = require("@ouc/eslint-config/.prettierrc");

module.exports = config;
```

### .scriptlintrc.js

```js
const config = require("@ouc/eslint-config/.scriptlintrc");

module.exports = config;
```

### commitlint.config.js

```js
const config = require("@ouc/eslint-config/commitlint.config");

module.exports = config;
```

### tsconfig.eslint.json

```json
{
    "compilerOptions": {
        "baseUrl": ".",
        "paths": {
            // make sure to include all the paths here that you also specified in your default tsconfig.json!
        }
    },
    "exclude": [
        "node_modules",
    ],
    "include": [
        ".eslintrc.js",
        "*.js",
        "*.ts",
        "**/*.js",
        "**/*.ts",
    ]
}
```

## Using it

Create the tasks in your package.json, e.g.

```json
{
    "scripts": {
        "lint": "run-p lint:scriptlint lint:eslint",
        "lint:commitlint": "commitlint --edit",
        "lint:eslint": "eslint --ext .js,.ts .",
        "lint:eslint:fix": "eslint --ext .js,.ts . --fix",
        "lint:scriptlint": "scriptlint"
    },
}
```

and create the following husky scripts:

```bash
npx husky-init

cp node_modules/@ouc/eslint-config/.husky/commit-msg .husky/commit-msg
cp node_modules/@ouc/eslint-config/.husky/pre-commit .husky/pre-commit
cp node_modules/@ouc/eslint-config/.husky/pre-push .husky/pre-push
chmod +x .husky/commit-msg .husky/pre-commit .husky/pre-push
```

and start using it :)

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