# @dzek69/eslint-config-typescript

> These are my preferred Typescript code style linting rules. You'll probably hate them.

Latest version **1.1.1** (published 2023-07-08) · MIT license · 0 weekly downloads

## Install

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

## 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 | 1.1.1 |
| Published | 2023-07-08 |
| First published | 2020-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 66.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jacek Nowacki @dzek69 |
| Maintainers | dzek69 |

## Links

- npm: https://www.npmjs.com/package/@dzek69/eslint-config-typescript
- Repository: https://github.com/dzek69/eslint-config-typescript
- npm.io page: https://npm.io/package/@dzek69/eslint-config-typescript

## Recent versions

- 1.1.1 (latest) — 2023-07-08
- 1.1.0 — 2023-04-14
- 1.0.2 — 2022-09-28
- 1.0.1 — 2022-07-02
- 1.0.0 — 2022-07-02
- 0.5.0 — 2022-03-15
- 0.4.0 — 2021-06-30
- 0.3.2 — 2021-05-09
- 0.3.1 — 2021-05-09
- 0.3.0 — 2021-05-09
- 0.2.4 — 2021-02-26
- 0.2.3 — 2021-02-16
- 0.2.2 — 2021-01-07
- 0.2.1 — 2021-01-07
- 0.2.0 — 2021-01-07
- … 5 more at https://npm.io/package/@dzek69/eslint-config-typescript/versions

## README

# eslint-config-typescript

These are my preferred Typescript code style linting rules. You'll probably hate them.

## Idea behind these

No tricks, no magic, no useless code, no complicated code. Very opinionated about all these spaces, quotes, parentheses.
A bit of sanity applied, but not too much.

## Installation

Installation steps assumes you've already configured base eslint config, ie: installed
[my base rules](https://github.com/dzek69/eslint-config-base).

```
npm i @typescript-eslint/eslint-plugin @typescript-eslint/parser typescript @dzek69/eslint-config-typescript --save-dev
```

In your `.eslintrc` file add the rules in `extends` array:
```json
{
  "extends": [
    "@dzek69/eslint-config-typescript"
  ]
}
```

It will automatically set parser, define proper plugin and set parserOptions.project to "./tsconfig.json" (please change
if needed).

Then to lint `src` and `test` directories with subdirectories run:
```
npx eslint src test --ext .ts,.tsx,.js,.jsx,.mjs
```

## Test files issues

If eslint complains on your test files being outside of your app source code dir please set some special `.tsconfig`
with proper `include` property set, see [this](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin).

## Usage with eslint import plugin

If you are using import plugin then disable `@typescript-eslint/no-duplicate-imports` rule. Base `no-duplicate-imports`
is disabled already by using my TS config.

## Full config example

```json
{
    "extends": [
        "@dzek69/eslint-config-base",
        "@dzek69/eslint-config-typescript"
    ],
    "env": {
        "node": true
    },
    "parserOptions": {
        "sourceType": "module",
        "project": "./tsconfig.lint.json"
    },
    "ignorePatterns": [],
    "overrides": [
        {
            "files": [
                "src/*.spec.*", "src/**/*.spec.*"
            ],
            "env": {
                "jest": true
            },
            "rules": {
                "func-names": "off",
                "global-require": "off",
                "max-lines": "off",
                "max-lines-per-function": "off",
                "max-statements": "off",
                "@typescript-eslint/no-empty-function": "off",
                "@typescript-eslint/no-magic-numbers": "off",
                "no-unused-labels": "off"
            }
        }
    ]
}
```

## License

MIT

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