Skip to content

Conversation

@sunghwan2789
Copy link

@sunghwan2789 sunghwan2789 commented Dec 13, 2022

fixes storybookjs/builder-vite#367

eslint tries to find config on executing isPathIgnored, and it errors if the config file does not exist.

This PR suppresses to call eslint method in transforming virtual module.

@sunghwan2789
Copy link
Author

sunghwan2789 commented Dec 14, 2022

You can test this build by adding git url in place of version tag:

  "devDependencies": {
    "vite-plugin-eslint": "git+https://github.com/sunghwan2789/vite-plugin-eslint.git#570cd3f67699fea88b351d76473c141eee39ca19"
  }

Also, repro is here:

git clone -b repro/virtual-module https://github.com/sunghwan2789/vite-plugin-eslint.git repro-virtual-module
cd repro-virtual-module
yarn
yarn storybook

@hi-reeve
Copy link

hi-reeve commented Dec 21, 2022

needed this to be merged @gxmari007

@con-dog
Copy link

con-dog commented Apr 11, 2023

When will this be merged? Until this is merged I can't use eslint with Vite and Storybook

@sunghwan2789
Copy link
Author

sunghwan2789 commented Apr 11, 2023

Hey there! You should consider vite-plugin-checker as a replacement for this plugin. It works without any problem, but also supports type checking.

@Callumk7
Copy link

When will this be merged? Until this is merged I can't use eslint with Vite and Storybook

@con-dog You can try updating your vite config file to exclude virtual files:

//vite.config.ts
//...
export default defineConfig({
	plugins: [
		//...
		eslintPlugin({
            exclude: [/virtual:/, /node_modules/]
		}),
	],
});

@angvp
Copy link

angvp commented May 8, 2024

Hey there! You should consider vite-plugin-checker as a replacement for this plugin. It works without any problem, but also supports type checking.

No one took this comment seriously, but this is today an abandoned project, I mean 2 years (almost 3 w/o an update), thanks for the suggestion fixed our issues!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Vite can not find eslint config

5 participants