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

Does this library seem to not support ESLint? #232

Open
wsy998 opened this issue Sep 17, 2023 · 5 comments
Open

Does this library seem to not support ESLint? #232

wsy998 opened this issue Sep 17, 2023 · 5 comments
Assignees
Labels
🙏 help wanted help in this issue is welcome

Comments

@wsy998
Copy link

wsy998 commented Sep 17, 2023

My Node.js version is v18.17, TypeScript version is 5.2.2, and the package manager is pnpm,eslint version is 8.49. When I run ESLint -fix, I encounter the following error:

 error  Resolve error: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './auto' is not defined by "exports" in D:\workspace\blogs\frontend\node_modules\vue-router\package.json
    at new NodeError (node:internal/errors:405:5)
    at exportsNotFound (node:internal/modules/esm/resolve:359:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:695:9)
    at resolveExports (node:internal/modules/cjs/loader:567:36)
    at Module._findPath (node:internal/modules/cjs/loader:636:31)
    at findModulePath (D:\workspace\blogs\frontend\node_modules\.pnpm\eslint-import-resolver-alias@1.1.2_eslint-plugin-import@2.28.1\node_modules\eslint-import-resolver-alias\index.js:99:27)
    at exports.resolve (D:\workspace\blogs\frontend\node_modules\.pnpm\eslint-import-resolver-alias@1.1.2_eslint-plugin-import@2.28.1\node_modules\eslint-import-resolver-alias\index.js:75:10)
    at withResolver (D:\workspace\blogs\frontend\node_modules\.pnpm\eslint-module-utils@2.8.0_@typescript-eslint+parser@5.62.0_eslint-import-resolver-node@0.3.9__ncnjxkvkijm55yp3hzjf6rdeaa\node_modules\eslint-module-utils\resolve.js:114:23)
    at fullResolve (D:\workspace\blogs\frontend\node_modules\.pnpm\eslint-module-utils@2.8.0_@typescript-eslint+parser@5.62.0_eslint-import-resolver-node@0.3.9__ncnjxkvkijm55yp3hzjf6rdeaa\node_modules\eslint-module-utils\resolve.js:135:22)
    at relative (D:\workspace\blogs\frontend\node_modules\.pnpm\eslint-module-utils@2.8.0_@typescript-eslint+parser@5.62.0_eslint-import-resolver-node@0.3.9__ncnjxkvkijm55yp3hzjf6rdeaa\node_modules\eslint-module-utils\resolve.js:84:10)  import/no-relative-packages

D:\workspace\blogs\frontend\src\routes\index.vue
  1:1  error  Component name "index" should always be multi-word  vue/multi-word-component-names
@wsy998
Copy link
Author

wsy998 commented Sep 17, 2023

However, Vite starts up normally without being affected.

@posva
Copy link
Owner

posva commented Sep 17, 2023

We probably need to add something like https://github.com/unplugin/unplugin-auto-import#eslint T some point. Or you could use the auto imports as shown in this read me and it will support the eslint config as shown in the other readme.

@wsy998
Copy link
Author

wsy998 commented Sep 17, 2023

I forgot to mention that I am using unplugin-auto-import and have also enabled the .eslintrc for unplugin-auto-import, but I am still getting this error.

@posva posva closed this as completed in 60429ca Oct 23, 2023
@posva posva reopened this Oct 23, 2023
@ByScripts
Copy link

I also have a problem with ESLint.

import { createRouter, createWebHistory } from 'vue-router/auto'

Gives me the error:

ESLint: Unable to resolve path to module 'vue-router/auto'.(import/no-unresolved)

@shaddollxz
Copy link

I also have a problem with ESLint.

import { createRouter, createWebHistory } from 'vue-router/auto'

Gives me the error:

ESLint: Unable to resolve path to module 'vue-router/auto'.(import/no-unresolved)

you can add this config in your .eslintrc.cjs(or other eslint config file)

  settings: {
    'import/core-modules': ['vue-router/auto'],
  },

@settings settings bot removed the help wanted label Feb 21, 2024
@posva posva added the 🙏 help wanted help in this issue is welcome label Feb 21, 2024
@posva posva self-assigned this Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 help wanted help in this issue is welcome
Projects
None yet
Development

No branches or pull requests

4 participants