Skip to content

An extension of eslint-config-standard, made for TypeScript.

Notifications You must be signed in to change notification settings

felskov/eslint-config-standard-with-typescript

 
 

Repository files navigation

Build Status JavaScript Style Guide Greenkeeper badge 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@6 eslint-plugin-standard@4 eslint-plugin-promise@4 eslint-plugin-import@2 eslint-plugin-node@9 @typescript-eslint/eslint-plugin@2 eslint-config-standard-with-typescript

Yes, I know it 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.json:

{
  "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 might care about.

Make sure you read about the --ext command line option. And here is a feature request for specifying extensions in the config.

Example command line usage:

npx eslint --ext .js,.ts .

About

An extension of eslint-config-standard, made for TypeScript.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.6%
  • JavaScript 0.4%