Package Exports
- eslint-import-resolver-typescript
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-import-resolver-typescript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eslint-import-resolver-typescript
This plugin adds typescript support to eslint-plugin-import.
This means you can:
import/requirefiles with extension.ts/.tsx!- Use
pathsdefined intsconfig.json.
Installation
npm install --save-dev eslint-plugin-import typescript-eslint-parser eslint-import-resolver-typescriptConfiguration
Add the following to your .eslintrc config:
{
"settings": {
"parser": "typescript-eslint-parser",
"plugins": [
"import"
],
"rules": {
// turn on errors for missing imports
"import/no-unresolved": "error"
},
"import/resolver": {
// use <root>/tsconfig.json
"typescript": {},
// use <root>/path/to/folder/tsconfig.json
"typescript": {
"directory": "./path/to/folder"
}
}
}
}Contributing
- Make sure your change is covered by a test import.
- Make sure that
npm testpasses without a failure.