Skip to content

Instantly share code, notes, and snippets.

@piotrwitek
Last active March 10, 2019 23:49
Show Gist options
  • Save piotrwitek/f15ad4bf2297ac60d06581f188ee52ff to your computer and use it in GitHub Desktop.
Save piotrwitek/f15ad4bf2297ac60d06581f188ee52ff to your computer and use it in GitHub Desktop.
Investigation on linting options available for TypeScript & React

Recent TSLint v5.0 config

https://github.com/piotrwitek/react-redux-typescript-guide#tslintjson

Use TSLint with rules based on airbnb style guide and some extensions

  • TSLint airbnb style guide:
    https://github.com/excelmicro/typescript
  • TSLint React rules:
    https://github.com/palantir/tslint-react
  • Manually add missing airbnb ESLint rules for TSLint:
    https://github.com/buzinas/tslint-eslint-rules

Use ESLint with typescript-eslint-parser

(still experimental but looks best for the future)

https://github.com/eslint/typescript-eslint-parser

  • load plugins: eslint-config-airbnb and eslint-plugin-react
    https://github.com/airbnb/javascript https://github.com/yannickcr/eslint-plugin-react
@dalexander01
Copy link

Just curious, have you tried typescript-eslint-parser yet? It definitely didn't work for me.

@vyorkin
Copy link

vyorkin commented Dec 6, 2016

it didn't work for me either :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment