Skip to content

Commit 7d89fd3

Browse files
committedSep 10, 2019
docs: update README, upgrade dependencies and release v0.2.0
1 parent 9121f0b commit 7d89fd3

File tree

5 files changed

+437
-414
lines changed

5 files changed

+437
-414
lines changed
 

‎.npmignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
1-
# eslint-import-resolver-typescript
1+
# eslint-import-resolver-ts
22

3-
[![Build Status](https://travis-ci.org/alexgorbatchev/eslint-import-resolver-typescript.svg?branch=master)](https://travis-ci.org/alexgorbatchev/eslint-import-resolver-typescript)
3+
[![Travis](https://img.shields.io/travis/com/rx-ts/eslint-import-resolver-ts.svg)](https://travis-ci.com/rx-ts/eslint-import-resolver-ts)
44

55
This plugin adds typescript support to [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import).
66

77
This means you can:
88

99
- `import`/`require` files with extension `.ts`/`.tsx`!
1010
- Use [`paths`](https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping) defined in `tsconfig.json`.
11+
- prefer resolve `@types/*` definitions over plain `.js`
12+
- Multiple tsconfigs just like normal
1113

1214
## Installation
1315

14-
```bash
15-
npm install --save-dev eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-typescript
16+
```sh
17+
# npm
18+
npm i -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-ts
19+
20+
# yarn
21+
yarn add -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-ts
1622
```
1723

1824
## Configuration
@@ -32,30 +38,30 @@ Add the following to your `.eslintrc` config:
3238
},
3339
"import/resolver": {
3440
// use <root>/tsconfig.json
35-
"typescript": {},
41+
"ts": {},
3642

3743
// use <root>/path/to/folder/tsconfig.json
38-
"typescript": {
44+
"ts": {
3945
"directory": "./path/to/folder"
4046
},
4147

4248
// Multiple tsconfigs (Useful for monorepos)
4349

4450
// use a glob pattern
45-
"typescript": {
51+
"ts": {
4652
"directory": "./packages/**/tsconfig.json"
4753
},
4854

4955
// use an array
50-
"typescript": {
56+
"ts": {
5157
"directory": [
5258
"./packages/module-a/tsconfig.json",
5359
"./packages/module-b/tsconfig.json"
5460
]
5561
},
5662

5763
// use an array of glob patterns
58-
"typescript": {
64+
"ts": {
5965
"directory": [
6066
"./packages/**/tsconfig.json",
6167
"./other-packages/**/tsconfig.json"
@@ -73,5 +79,6 @@ Add the following to your `.eslintrc` config:
7379
- Make sure that `npm test` passes without a failure.
7480
- Make sure your code is formatted `npm format`.
7581

76-
We have an [automatic travis build](https://travis-ci.org/alexgorbatchev/eslint-import-resolver-typescript) which will run the above on your PRs.
82+
We have an [automatic travis build](https://travis-ci.org/rx-ts/eslint-import-resolver-ts) which will run the above on your PRs.
83+
7784
If either fails, we won't be able to merge your PR until it's fixed.

‎package-lock.json

Lines changed: 410 additions & 386 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-import-resolver-ts",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "TypeScript .ts .tsx module resolver for `eslint-plugin-import`.",
55
"main": "index.js",
66
"files": [
@@ -20,11 +20,11 @@
2020
"author": "Alex Gorbatchev <alex.gorbatchev@gmail.com>",
2121
"license": "ISC",
2222
"dependencies": {
23-
"debug": "^4.0.1",
23+
"debug": "^4.1.1",
2424
"glob": "^7.1.4",
2525
"is-glob": "^4.0.1",
26-
"resolve": "^1.4.0",
27-
"tsconfig-paths": "^3.6.0"
26+
"resolve": "^1.12.0",
27+
"tsconfig-paths": "^3.8.0"
2828
},
2929
"peerDependencies": {
3030
"eslint": "*",
@@ -33,14 +33,14 @@
3333
"devDependencies": {
3434
"@types/unist": "^2.0.3",
3535
"dummy.js": "file:dummy.js",
36-
"eslint": "^5.6.1",
37-
"eslint-plugin-import": "^2.14.0",
38-
"prettier": "^1.14.3",
39-
"typescript": "^3.1.1"
36+
"eslint": "^6.3.0",
37+
"eslint-plugin-import": "^2.18.2",
38+
"prettier": "^1.18.2",
39+
"typescript": "^3.6.3"
4040
},
4141
"scripts": {
4242
"test": "eslint ./tests/withPaths/index.ts && eslint ./tests/withoutPaths/index.ts && eslint ./tests/multipleTsconfigs/**/index.ts",
43-
"check-format": "prettier --config prettier.config.js index.js -l",
44-
"format": "prettier --config prettier.config.js index.js --write"
43+
"check-format": "prettier index.js -l",
44+
"format": "prettier index.js --write"
4545
}
4646
}

‎prettier.config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@
33
module.exports = {
44
arrowParens: 'avoid',
55
bracketSpacing: true,
6-
parser: 'babylon',
76
jsxBracketSameLine: true,
87
proseWrap: 'preserve',
9-
semi: true,
108
singleQuote: true,
11-
tabWidth: 2,
129
trailingComma: 'all',
13-
useTabs: false,
1410
};

0 commit comments

Comments
 (0)
Please sign in to comment.