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

drop eslint-plugin-import #203

Closed
3 tasks done
arily opened this issue Jun 21, 2023 · 4 comments
Closed
3 tasks done

drop eslint-plugin-import #203

arily opened this issue Jun 21, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@arily
Copy link
Contributor

arily commented Jun 21, 2023

Clear and concise description of the problem

Hi,
I am running into an issue with TS5.0 extends.

My tsconfig.json

{
  "extends": ["./.nuxt/tsconfig.json", "./tsconfig.base.json"]
}

will cause an error:

Oops! Something went wrong! :(

ESLint: 8.43.0

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Array
Occurred while linting /repo/nuxt.config.ts:2
Rule: "import/default"
    at new NodeError (node:internal/errors:399:5)
    at validateString (node:internal/validators:163:11)
    at Object.join (node:path:1172:7)
    at loadTsconfig (/repo/node_modules/tsconfig-paths/lib/tsconfig-loader.js:93:39)
    at loadSyncDefault (/repo/node_modules/tsconfig-paths/lib/tsconfig-loader.js:40:18)
    at tsConfigLoader (/repo/node_modules/tsconfig-paths/lib/tsconfig-loader.js:26:22)
    at readTsConfig (/repo/node_modules/eslint-plugin-import/lib/ExportMap.js:818:528)
    at isEsModuleInterop (/repo/node_modules/eslint-plugin-import/lib/ExportMap.js:821:277)
    at ExportMap.parse (/repo/node_modules/eslint-plugin-import/lib/ExportMap.js:808:317)
    at ExportMap.for (/repo/node_modules/eslint-plugin-import/lib/ExportMap.js:807:201)

related issues/prs:

Suggested solution

switch to eslint-plugin-i

Alternative

here are some hacks mentioned in the related issues:

Additional context

No response

Validations

@arily arily added the enhancement New feature or request label Jun 21, 2023
@antfu
Copy link
Owner

antfu commented Jun 21, 2023

PR welcome :)

@arily
Copy link
Contributor Author

arily commented Jun 22, 2023

#205

here you go

@arily arily closed this as completed Jun 29, 2023
@baixiaoyu2997
Copy link
Contributor

baixiaoyu2997 commented Jun 30, 2023

Just a reminder for users who want to switch to multiple values for extends. Although the related pull request has resolved this issue, you may still encounter the "TypeError: value.replace is not a function" error when using @commitlint. Please refer to: TypeStrong/ts-node#2000 for more information.

@fxzer
Copy link

fxzer commented Oct 27, 2023

image
我遇到了相同的问题,请问怎么解决呢?
I have encountered the same problem, how can I solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants