Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6c9c840

Browse filesBrowse files
JounQinjsjoeio
andauthored
chore: replace eslint-import-resolver-alias with eslint-import-resolver-typescript (coder#4546)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
1 parent d15731a commit 6c9c840
Copy full SHA for 6c9c840

9 files changed

+40-20Lines changed: 40 additions & 20 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.eslintrc.yaml‎

Copy file name to clipboardExpand all lines: .eslintrc.yaml
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,8 @@ rules:
3636
import/order:
3737
[error, { alphabetize: { order: "asc" }, groups: [["builtin", "external", "internal"], "parent", "sibling"] }]
3838
no-async-promise-executor: off
39-
# This isn't a real module, just types, which apparently doesn't resolve.
40-
import/no-unresolved: [error, { ignore: ["express-serve-static-core"] }]
4139

4240
settings:
43-
# Does not work with CommonJS unfortunately.
44-
import/ignore:
45-
- env-paths
46-
- xdg-basedir
41+
import/resolver:
42+
typescript:
43+
alwaysTryTypes: true
Collapse file

‎package.json‎

Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"doctoc": "^2.0.0",
5757
"eslint": "^7.7.0",
5858
"eslint-config-prettier": "^8.1.0",
59-
"eslint-import-resolver-alias": "^1.1.2",
59+
"eslint-import-resolver-typescript": "^2.5.0",
6060
"eslint-plugin-import": "^2.18.2",
6161
"eslint-plugin-prettier": "^4.0.0",
6262
"prettier": "^2.2.1",
Collapse file

‎src/node/http.ts‎

Copy file name to clipboardExpand all lines: src/node/http.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as expressCore from "express-serve-static-core"
44
import * as http from "http"
55
import * as net from "net"
66
import path from "path"
7-
import qs from "qs"
7+
import * as qs from "qs"
88
import { Disposable } from "../common/emitter"
99
import { CookieKeys, HttpCode, HttpError } from "../common/http"
1010
import { normalize } from "../common/util"
Collapse file

‎src/node/routes/pathProxy.ts‎

Copy file name to clipboardExpand all lines: src/node/routes/pathProxy.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Request, Response } from "express"
22
import * as path from "path"
3-
import qs from "qs"
3+
import * as qs from "qs"
44
import * as pluginapi from "../../../typings/pluginapi"
55
import { HttpCode, HttpError } from "../../common/http"
66
import { normalize } from "../../common/util"
Collapse file

‎src/node/wsRouter.ts‎

Copy file name to clipboardExpand all lines: src/node/wsRouter.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@ export function Router(): WebsocketRouter {
5050
return new WebsocketRouter()
5151
}
5252

53+
// eslint-disable-next-line import/no-named-as-default-member -- the typings are not updated correctly
5354
export const wss = new Websocket.Server({ noServer: true })
Collapse file

‎test/unit/node/proxy.test.ts‎

Copy file name to clipboardExpand all lines: test/unit/node/proxy.test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import bodyParser from "body-parser"
1+
import * as bodyParser from "body-parser"
22
import * as express from "express"
33
import * as http from "http"
44
import nodeFetch from "node-fetch"
Collapse file
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
settings: {
3+
"import/resolver": {
4+
typescript: {
5+
project: __dirname,
6+
},
7+
},
8+
},
9+
}
Collapse file

‎test/unit/node/test-plugin/.eslintrc.yaml‎

Copy file name to clipboardExpand all lines: test/unit/node/test-plugin/.eslintrc.yaml
-5Lines changed: 0 additions & 5 deletions
This file was deleted.
Collapse file

‎yarn.lock‎

Copy file name to clipboardExpand all lines: yarn.lock
+23-5Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,11 +1530,6 @@ eslint-config-prettier@^8.1.0:
15301530
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a"
15311531
integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==
15321532

1533-
eslint-import-resolver-alias@^1.1.2:
1534-
version "1.1.2"
1535-
resolved "https://registry.yarnpkg.com/eslint-import-resolver-alias/-/eslint-import-resolver-alias-1.1.2.tgz#297062890e31e4d6651eb5eba9534e1f6e68fc97"
1536-
integrity sha512-WdviM1Eu834zsfjHtcGHtGfcu+F30Od3V7I9Fi57uhBEwPkjDcii7/yW8jAT+gOhn4P/vOxxNAXbFAKsrrc15w==
1537-
15381533
eslint-import-resolver-node@^0.3.4:
15391534
version "0.3.4"
15401535
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717"
@@ -1543,6 +1538,17 @@ eslint-import-resolver-node@^0.3.4:
15431538
debug "^2.6.9"
15441539
resolve "^1.13.1"
15451540

1541+
eslint-import-resolver-typescript@^2.5.0:
1542+
version "2.5.0"
1543+
resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.5.0.tgz#07661966b272d14ba97f597b51e1a588f9722f0a"
1544+
integrity sha512-qZ6e5CFr+I7K4VVhQu3M/9xGv9/YmwsEXrsm3nimw8vWaVHRDrQRp26BgCypTxBp3vUp4o5aVEJRiy0F2DFddQ==
1545+
dependencies:
1546+
debug "^4.3.1"
1547+
glob "^7.1.7"
1548+
is-glob "^4.0.1"
1549+
resolve "^1.20.0"
1550+
tsconfig-paths "^3.9.0"
1551+
15461552
eslint-module-utils@^2.6.1:
15471553
version "2.6.1"
15481554
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233"
@@ -2036,6 +2042,18 @@ glob@^7.1.3:
20362042
once "^1.3.0"
20372043
path-is-absolute "^1.0.0"
20382044

2045+
glob@^7.1.7:
2046+
version "7.2.0"
2047+
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023"
2048+
integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==
2049+
dependencies:
2050+
fs.realpath "^1.0.0"
2051+
inflight "^1.0.4"
2052+
inherits "2"
2053+
minimatch "^3.0.4"
2054+
once "^1.3.0"
2055+
path-is-absolute "^1.0.0"
2056+
20392057
global-modules@^2.0.0:
20402058
version "2.0.0"
20412059
resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.