package.json exports
Summary
exports , types , default (should)

Environments
Node.js: v20.11.1
TypeScript: v5.4.3
eslint: v8.57.0
eslint-plugin-import: v2.29.1
eslint-import-resolver-typescript: v3.6.1

Introduction
:
monorepo
eslint eslint-plugin-import 使
, eslint-plugin-import , eslint-import-resolver-typescript import/no-unresolved
, , import/no-unresolved eslint
,
package.json exports :
"exports": {
".": {
"default": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
:
"exports": {
".": {
"types": "./dist/index.d.ts", // <- types
"default": "./dist/index.js" // <- default
}
},
Node.js Docs :
> "default" - the generic fallback that always matches. Can be a CommonJS or ES module file. This condition should always come last.
> "types" - can be used by typing systems to resolve the typing file for the given export. This condition should always be included first.
調, eslint-plugin-import package.json default ()
Docs "the generic fallback that always matches. Can be a CommonJS or ES module file."
exports , Node.js ESM CommonJS
, eslint-plugin-import (調 GitHub Issue )
eslint-import-resolver-typescript
, types default

References
eslint Shareable Config monorepo
FlatConfig monorepo @scope/package/hoge , @scope/package/fuga exports
, monorepo
monorepo