Skip to content

chore: add test case for #409 #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"node": "18",
"sandboxes": []
"sandboxes": [],
"packages": [
"."
]
}
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ jobs:
title: 'chore: release eslint-import-resolver-typescript'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.20.7
18.20.8
662 changes: 331 additions & 331 deletions .yarn/releases/yarn-4.7.0.cjs → .yarn/releases/yarn-4.8.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ plugins:
path: .yarn/plugins/plugin-prepare-lifecycle.cjs
spec: 'https://github.com/un-es/yarn-plugin-prepare-lifecycle/releases/download/v0.0.1/index.js'

yarnPath: .yarn/releases/yarn-4.7.0.cjs
yarnPath: .yarn/releases/yarn-4.8.0.cjs
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,15 @@ If either fails, we won't be able to merge your PR until it's fixed.

## Sponsors

| 1stG | RxTS | UnTS |
| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers and sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers and sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers and sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |
| 1stG | RxTS | UnTS |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |

## Backers

| 1stG | RxTS | UnTS |
| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers and sponsors](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers and sponsors](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers and sponsors](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |
| 1stG | RxTS | UnTS |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |

## Changelog

Expand Down
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
"contributors": [
"JounQin <[email protected]> (https://www.1stG.me)"
],
"funding": "https://opencollective.com/unts/projects/eslint-import-resolver-ts",
"funding": "https://opencollective.com/eslint-import-resolver-typescript",
"license": "ISC",
"packageManager": "[email protected]",
"workspaces": [
".",
"tests/nestedPackageJson"
],
"packageManager": "[email protected]",
"engines": {
"node": "^16.17.0 || >=18.6.0"
},
Expand Down Expand Up @@ -55,6 +59,7 @@
"test:multipleEslintrcs": "yarn eslint --ext ts,tsx tests/multipleEslintrcs",
"test:multipleTsconfigs": "yarn eslint --ext ts,tsx tests/multipleTsconfigs",
"test:nearestTsconfig": "yarn eslint --ext ts,tsx tests/nearestTsconfig",
"test:nestedPackageJson": "yarn eslint --ext ts,tsx tests/nestedPackageJson",
"test:unit": "vitest --run",
"test:withJsExtension": "node tests/withJsExtension/test.js && yarn eslint --ext ts,tsx tests/withJsExtension",
"test:withJsconfig": "yarn eslint --ext js tests/withJsconfig",
Expand Down Expand Up @@ -94,7 +99,7 @@
"@pkgr/rollup": "^6.0.1",
"@total-typescript/ts-reset": "^0.6.1",
"@types/debug": "^4.1.12",
"@types/node": "^22.13.13",
"@types/node": "^22.13.14",
"@types/pnpapi": "^0.0.5",
"@types/unist": "^3.0.3",
"@vitest/coverage-v8": "3.0.9",
Expand All @@ -111,7 +116,7 @@
"simple-git-hooks": "^2.12.1",
"size-limit": "^11.2.0",
"size-limit-preset-node-lib": "^0.3.0",
"tinyexec": "^1.0.0",
"tinyexec": "^1.0.1",
"type-coverage": "^2.29.7",
"typescript": "~5.8.2",
"vitest": "^3.0.9",
Expand Down
2 changes: 1 addition & 1 deletion tests/base.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @import {TSESLint} from '@typescript-eslint/utils'
* @param {string} project
* @param {string | string[]} project
* @returns {TSESLint.ClassicConfig.Config}
*/
const base = project => ({
Expand Down
5 changes: 5 additions & 0 deletions tests/nestedPackageJson/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const path = require('node:path')

module.exports = require('../base.eslintrc.cjs')(
path.resolve(__dirname, 'tsconfig.json'),
)
1 change: 1 addition & 0 deletions tests/nestedPackageJson/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.yarn/*
8 changes: 8 additions & 0 deletions tests/nestedPackageJson/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "nested-package-json",
"version": "1.0.0",
"private": true,
"devDependencies": {
"@atlaskit/pragmatic-drag-and-drop": "^1.5.2"
}
}
1 change: 1 addition & 0 deletions tests/nestedPackageJson/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { combine } from '@atlaskit/pragmatic-drag-and-drop/combine'
5 changes: 5 additions & 0 deletions tests/nestedPackageJson/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"module": "Node16"
}
}
61 changes: 47 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,17 @@ __metadata:
languageName: node
linkType: hard

"@atlaskit/pragmatic-drag-and-drop@npm:^1.5.2":
version: 1.5.2
resolution: "@atlaskit/pragmatic-drag-and-drop@npm:1.5.2"
dependencies:
"@babel/runtime": "npm:^7.0.0"
bind-event-listener: "npm:^3.0.0"
raf-schd: "npm:^4.0.3"
checksum: 10/85009e9f819e8a6431632f4eff83b5f5928c708f51730d22590585600e000d26686cb03bb7a8e89a4f838e8d631786d81d82c71620f5c6d5d33ca51a205010c8
languageName: node
linkType: hard

"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.21.4, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.26.2":
version: 7.26.2
resolution: "@babel/code-frame@npm:7.26.2"
Expand Down Expand Up @@ -1821,12 +1832,12 @@ __metadata:
languageName: node
linkType: hard

"@babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.4":
version: 7.26.10
resolution: "@babel/runtime@npm:7.26.10"
"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.4":
version: 7.27.0
resolution: "@babel/runtime@npm:7.27.0"
dependencies:
regenerator-runtime: "npm:^0.14.0"
checksum: 10/9d7ff8e96abe3791047c1138789c742411e3ef19c4d7ca18ce916f83cec92c06ec5dc64401759f6dd1e377cf8a01bbd2c62e033eb7550f435cf6579768d0d4a5
checksum: 10/e6966e03b695feb4c0ac0856a4355231c2580bf9ebd0298f47739f85c0ea658679dd84409daf26378d42c86c1cbe7e33feab709b14e784254b6c441d91606465
languageName: node
linkType: hard

Expand Down Expand Up @@ -3911,12 +3922,12 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:*, @types/node@npm:^22.0.0, @types/node@npm:^22.13.13":
version: 22.13.13
resolution: "@types/node@npm:22.13.13"
"@types/node@npm:*, @types/node@npm:^22.0.0, @types/node@npm:^22.13.14":
version: 22.13.14
resolution: "@types/node@npm:22.13.14"
dependencies:
undici-types: "npm:~6.20.0"
checksum: 10/1750518a26fe070dcd4aacd9869d8c72c5b315e3b2fc643e3604fa02b3adac2817eae7808ae34c6bdd6ac96bb5d25acea59656c4ac155b1ee47469a65d32eba4
checksum: 10/5fafad441c7bb27f963aa8fdfa0787ffb1142b27f4dd2047a2cc27a39f981b432acc71a9b5a428a258f93daeb72f12b7468ab9163a41fe4f98584bc5d42ade6e
languageName: node
linkType: hard

Expand Down Expand Up @@ -5168,6 +5179,13 @@ __metadata:
languageName: node
linkType: hard

"bind-event-listener@npm:^3.0.0":
version: 3.0.0
resolution: "bind-event-listener@npm:3.0.0"
checksum: 10/3d442307ee906b79f041433b065e7b259bd1e5231a74519271cc5beb485f7c469609da9c7f20fdd0b3ab340e4691fee826b76d003c71cf5ad955186aba5c256e
languageName: node
linkType: hard

"birecord@npm:^0.1.1":
version: 0.1.1
resolution: "birecord@npm:0.1.1"
Expand Down Expand Up @@ -6638,7 +6656,7 @@ __metadata:
"@pkgr/rollup": "npm:^6.0.1"
"@total-typescript/ts-reset": "npm:^0.6.1"
"@types/debug": "npm:^4.1.12"
"@types/node": "npm:^22.13.13"
"@types/node": "npm:^22.13.14"
"@types/pnpapi": "npm:^0.0.5"
"@types/unist": "npm:^3.0.3"
"@vitest/coverage-v8": "npm:3.0.9"
Expand All @@ -6659,7 +6677,7 @@ __metadata:
size-limit: "npm:^11.2.0"
size-limit-preset-node-lib: "npm:^0.3.0"
stable-hash: "npm:^0.0.5"
tinyexec: "npm:^1.0.0"
tinyexec: "npm:^1.0.1"
tinyglobby: "npm:^0.2.12"
type-coverage: "npm:^2.29.7"
typescript: "npm:~5.8.2"
Expand Down Expand Up @@ -10736,6 +10754,14 @@ __metadata:
languageName: node
linkType: hard

"nested-package-json@workspace:tests/nestedPackageJson":
version: 0.0.0-use.local
resolution: "nested-package-json@workspace:tests/nestedPackageJson"
dependencies:
"@atlaskit/pragmatic-drag-and-drop": "npm:^1.5.2"
languageName: unknown
linkType: soft

"next-tick@npm:^1.1.0":
version: 1.1.0
resolution: "next-tick@npm:1.1.0"
Expand Down Expand Up @@ -11662,6 +11688,13 @@ __metadata:
languageName: node
linkType: hard

"raf-schd@npm:^4.0.3":
version: 4.0.3
resolution: "raf-schd@npm:4.0.3"
checksum: 10/45514041c5ad31fa96aef3bb3c572a843b92da2f2cd1cb4a47c9ad58e48761d3a4126e18daa32b2bfa0bc2551a42d8f324a0e40e536cb656969929602b4e8b58
languageName: node
linkType: hard

"react@npm:^19.0.0":
version: 19.0.0
resolution: "react@npm:19.0.0"
Expand Down Expand Up @@ -13868,10 +13901,10 @@ __metadata:
languageName: node
linkType: hard

"tinyexec@npm:^1.0.0":
version: 1.0.0
resolution: "tinyexec@npm:1.0.0"
checksum: 10/2c3e8c6351380d80621f75eae722a25d46a08a993924d2238533185a7cb5e55bfbaf41f1742d2d80df45177a42a9549827b208ac902bb0ef87cff7454686d413
"tinyexec@npm:^1.0.1":
version: 1.0.1
resolution: "tinyexec@npm:1.0.1"
checksum: 10/1f3c3281912d4ab168e067baf46627bb85a803eba0bcea113bba9fe8bdfdcc279cad08052a600d4b8fb603dd57e1af0c500e50a5e7e6b29b2574c88556f41fa6
languageName: node
linkType: hard

Expand Down