Skip to content

Commit 9f216c5

Browse files
committed
chore(eslint): configure TypeScript resolver for NodeNext; remove inline import/no-unresolved disables\n\n- Add eslint-import-resolver-typescript and resolver settings to .eslintrc.cjs\n- Drop per-line import/no-unresolved suppressions in src/index.ts and src/hooks.ts\n\ntest: use .js import specifiers throughout and fix skipped watch tests\n\n- Switch tests to import emitted .js (NodeNext-friendly) instead of .ts\n- Remove assignments to undeclared 'compiler' in skipped watch tests\n\nBuild/lint/test all green locally
1 parent 6471bf5 commit 9f216c5

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

.eslintrc.cjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ module.exports = {
1313
},
1414
node: {
1515
extensions: ['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts', '.d.ts']
16+
// Ensure import/no-unresolved can resolve NodeNext + TS paths where source files
17+
// use .js specifiers that map to .ts during authoring.
18+
'import/resolver': {
19+
typescript: {
20+
project: ['./tsconfig.eslint.json']
21+
},
22+
node: {
23+
extensions: ['.js', '.ts', '.d.ts']
1624
}
1725
}
1826
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"eslint": "8.57.0",
5959
"eslint-config-shellscape": "^6.0.0",
6060
"eslint-import-resolver-typescript": "^4.4.4",
61+
"eslint-import-resolver-typescript": "^3.10.1",
6162
"file-loader": "^6.2.0",
6263
"husky": "8.0.2",
6364
"lint-staged": "11.1.1",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)