# eslint-config-standard-with-typescript

> An ESLint Shareable Config for JavaScript Standard Style with TypeScript support

Latest version **43.0.1** (published 2024-01-20) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install eslint-config-standard-with-typescript
pnpm add eslint-config-standard-with-typescript
yarn add eslint-config-standard-with-typescript
bun add eslint-config-standard-with-typescript
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 43.0.1 |
| Published | 2024-01-20 |
| First published | 2017-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 17.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 818 |
| Author | Shahar Or |
| Maintainers | jhiesey, bret, feross, flet, linusu, mafintosh, jprichardson, watson, raynos, toddbluhm, voxpelli, mightyiam, rostislav-simonik |
| Keywords | JavaScript Standard Style, check, checker, code, code checker, code linter, code standards, code style, enforce, eslint, eslintconfig, hint, jscs, jshint, lint, policy, quality, simple, standard, standard style, style, style checker, style linter, verify, TypeScript |

## Links

- npm: https://www.npmjs.com/package/eslint-config-standard-with-typescript
- Repository: https://github.com/mightyiam/eslint-config-standard-with-typescript
- Homepage: https://github.com/mightyiam/eslint-config-standard-with-typescript#readme
- Issues: https://github.com/mightyiam/eslint-config-standard-with-typescript/issues
- npm.io page: https://npm.io/package/eslint-config-standard-with-typescript

## Dependencies (2)

- [eslint-config-standard](https://npm.io/package/eslint-config-standard.md) 17.1.0
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^6.4.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

- 43.0.1 (latest) — 2024-01-20
- 43.0.0 — 2023-12-16
- 42.0.0 — 2023-12-09
- 41.0.0 — 2023-12-09
- 40.0.0 — 2023-11-18
- 39.1.1 — 2023-10-07
- 39.1.0 — 2023-09-23
- 39.0.0 — 2023-08-27
- 38.1.0 — 2023-08-27
- 38.0.0 — 2023-08-20
- 37.0.0 — 2023-07-22
- 36.1.1 — 2023-07-22
- 36.1.0 — 2023-07-15
- 36.0.1 — 2023-07-14
- 36.0.0 — 2023-06-30
- … 52 more at https://npm.io/package/eslint-config-standard-with-typescript/versions

## README

[![Build Status](https://github.com/mightyiam/eslint-config-standard-with-typescript/actions/workflows/ci.yaml/badge.svg)](https://github.com/mightyiam/eslint-config-standard-with-typescript/actions/workflows/ci.yaml)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![npm](https://img.shields.io/npm/v/eslint-config-standard-with-typescript)](https://www.npmjs.com/package/eslint-config-standard-with-typescript)

An [ESLint shareable config](https://eslint.org/docs/developer-guide/shareable-configs) for TypeScript that is based on [eslint-config-standard](https://github.com/standard/eslint-config-standard) and has TypeScript specific rules from [@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin).

# Peer dependencies 

This package specifies the following `peerDependencies`:

- TypeScript, which you may already have installed
- [ESLint](https://github.com/eslint/eslint)
- 3 Peer dependencies of [eslint-config-standard](https://github.com/standard/eslint-config-standard)
- [@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin); ESLint rules for TypeScript.

Yes, this is a large number of `peerDependencies`.
This is due to [a known limitation in ESLint](https://github.com/eslint/eslint/issues/3458).

# @typescript-eslint dependencies

This package has `@typescript-eslint/parser` in `dependencies`.  
And it has `@typescript-eslint/eslint-plugin` in `peerDependencies`.  
Both are specified as ranges.
It's probably safest for the installed versions of these packages to be the same.
This can be achieved by:

1. Pin (exact version) the `@typescript-eslint/eslint-plugin` in `package.json`.
1. Have a `package-lock.json` which locks the version of the `@typescript-eslint/parser` sub-dependency.

And both pin/lock to the same version.

# Yarn

Yarn does not automatically install `peerDependencies`,
so if that's what you're using, install them manually.
Here is an example, but use it only for reference,
because your decisions regarding version ranges and range specifiers may vary.

```
yarn add --dev \
  typescript@\* \
  eslint@^8.0.1 \
  eslint-plugin-promise@^6.0.0 \
  eslint-plugin-import@^2.25.2 \
  eslint-plugin-n@^15.0.0 \
  @typescript-eslint/eslint-plugin@^6.4.0 \
  eslint-config-standard-with-typescript@latest
```

# Example config

Here is an example `.eslintrc.js`.
Pay close attention to the `files` property, because it [determines which files are linted][specifying-target-files-to-lint].

```js
module.exports = {
  overrides: [
    {
      files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
      extends: 'standard-with-typescript'
    }
  ],
}
```

Note: the config exported by this package sets `parserOptions.project = true`.
Read about the `project` option [here](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/README.md#configuration).

There are [some more `parserOptions`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/README.md#configuration) you may care about.

[specifying-target-files-to-lint]: https://eslint.org/docs/latest/use/configure/configuration-files#specifying-target-files-to-lint

# Example command line usage:

```
$ npx eslint .
```

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