@gerhut/eslint-config-standard-with-typescript
TypeScript icon, indicating that this package has built-in type declarations

17.0.1 • Public • Published

Build Status JavaScript Style Guide Releases

eslint-config-standard-with-typescript

An ESLint shareable config for TypeScript that is based on eslint-config-standard and has TypeScript specific rules from @typescript-eslint/eslint-plugin.

Usage

npm install --save-dev eslint@7 eslint-plugin-standard@4 eslint-plugin-promise@4 eslint-plugin-import@2 eslint-plugin-node@11 @typescript-eslint/eslint-plugin@2 eslint-config-standard-with-typescript

Yes, this is a large number of packages. This is due to a known limitation in ESLint.

This long list of dependencies includes:

  1. ESLint
  2. Peer dependencies of eslint-config-standard
  3. @typescript-eslint/eslint-plugin; ESLint rules for TypeScript.

Here is an example .eslintrc.js:

module.exports = {
  extends: 'standard-with-typescript',
  parserOptions: {
    project: './tsconfig.json'
  }
}

Note: Please read some important instructions regarding the project option here.

There are some more parserOptions you may care about.

If you're using ESLint v6 make sure you read about the --ext command line option.

Example command line usage for ESLint v6:

$ npx eslint --ext .js,.ts .

Example command line usage for ESLint v7:

$ npx eslint .

Package Sidebar

Install

npm i @gerhut/eslint-config-standard-with-typescript

Weekly Downloads

2

Version

17.0.1

License

MIT

Unpacked Size

46.2 kB

Total Files

7

Last publish

Collaborators

  • gerhut