This plugin adds TypeScript support to eslint-plugin-import
.
This means you can:
import
/require
files with extension.ts
/.tsx
!- Use
paths
defined intsconfig.json
. - Prefer resolve
@types/*
definitions over plain.js
. - Multiple tsconfigs support just like normal.
# npm
npm i -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-typescript
# yarn
yarn add -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-typescript
Add the following to your .eslintrc
config:
- Make sure your change is covered by a test import.
- Make sure that
yarn test
passes without a failure. - Make sure that
yarn lint
passes without conflicts. - Make sure your code changes match our type-coverage settings:
yarn type-coverage
.
We have GitHub Actions which will run the above commands on your PRs.
If either fails, we won't be able to merge your PR until it's fixed.