Skip to content
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

Support for jsconfig.json #73

Closed
marialovesbeans opened this issue May 17, 2021 · 7 comments · Fixed by #161
Closed

Support for jsconfig.json #73

marialovesbeans opened this issue May 17, 2021 · 7 comments · Fixed by #161

Comments

@marialovesbeans
Copy link

Our project doesn't use Typescript by rather only Javascript, thus only have jsconfig.json file. Does this package support jsconfig.json? Thanks!

@JounQin
Copy link
Collaborator

JounQin commented May 17, 2021

You can just try project option.

@JounQin JounQin closed this as completed May 17, 2021
@rbong
Copy link
Contributor

rbong commented Aug 1, 2022

project doesn't work because get-tsconfig, which this package relies on, doesn't support jsconfig.json.

const { getTsconfig } = require("get-tsconfig")

getTsconfig("./projectWithTsconfig")
// { path: 'projectWithTsconfig/tsconfig.json', config: { compilerOptions: { baseUrl: '.' } } }

getTsconfig("./projectWithJsconfig")
// null

This is a get-tsconfig issue at its core but the given solution does not work.

@JounQin
Copy link
Collaborator

JounQin commented Aug 1, 2022

getTsconfig("./projectWithTsconfig/jsconfig.json")

@rbong
Copy link
Contributor

rbong commented Aug 1, 2022

getTsconfig("./projectWithJsconfig/jsconfig.json")
// null

@JounQin
Copy link
Collaborator

JounQin commented Aug 1, 2022

Please provide a minimal but runnable reproduction.

https://antfu.me/posts/why-reproductions-are-required

@JounQin JounQin reopened this Aug 1, 2022
@JounQin
Copy link
Collaborator

JounQin commented Aug 1, 2022

@rbong Would you like to raise a PR for it?

const tsconfigResult = getTsconfig(projectPath)

projectPath should already be an absolute path, so it can be changed as a dir path + filename easily.

@rbong
Copy link
Contributor

rbong commented Aug 1, 2022

@JounQin Yes, I'm working on a PR

rbong added a commit to rbong/eslint-import-resolver-typescript that referenced this issue Aug 1, 2022
rbong added a commit to rbong/eslint-import-resolver-typescript that referenced this issue Aug 1, 2022
@JounQin JounQin pinned this issue Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants