Skip to content

Docs: some enhancement declaring default values for options. #430

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

Open
Mister-Hope opened this issue Apr 12, 2025 · 1 comment
Open

Docs: some enhancement declaring default values for options. #430

Mister-Hope opened this issue Apr 12, 2025 · 1 comment

Comments

@Mister-Hope
Copy link

Mister-Hope commented Apr 12, 2025

It was not clear for any default value of options except these four: https://github.com/import-js/eslint-import-resolver-typescript?tab=readme-ov-file#options-from-unrs-resolver

It took me some time to reed through codes to find out that alwaysTryTypes is true by default.

It would be great if every default value of options are implicitly declared in README.

BTW, I can not make this PR myself as I am still confusing about the default behavior without project option after spending a few time with codes.

@JounQin
Copy link
Collaborator

JounQin commented Apr 12, 2025

Indeed, you can check and contribute!

export interface TypeScriptResolverOptions extends NapiResolveOptions {
project?: string[] | string
/**
* @default true - whether to always try to resolve `@types` packages
*/
alwaysTryTypes?: boolean
/**
* Whether `bun` core modules should be accounted
*/
bun?: boolean
noWarnOnMultipleProjects?: boolean
}

alwaysTryTypes defaults to true, project defaults to root tsconfig.json or jsconfig.json if detected.

And bun already has its own doc section at https://github.com/import-js/eslint-import-resolver-typescript?tab=readme-ov-file#bun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants