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

[vite-plugin-checker] ESLint / Prettier / TypeCheck / Vite Plugins in general #405

Closed
Timeraa opened this issue Feb 3, 2024 · 3 comments · Fixed by #419
Closed

[vite-plugin-checker] ESLint / Prettier / TypeCheck / Vite Plugins in general #405

Timeraa opened this issue Feb 3, 2024 · 3 comments · Fixed by #419
Labels
vite plugin Issue related to integrating a specific vite plugin

Comments

@Timeraa
Copy link
Member

Timeraa commented Feb 3, 2024

This is more of a question / feature task. Ideally I would like to utilize ESLint, TypeScript Typechecking and Prettier when developing a browser extension. Using something like vite-plugin-checker is what I use in most Vite projects for this task but with how the entry points work it would start said task for each entry point.

I also utilize a small helper function to generate the _locales folder which downloads strings from my project's API and writes them into the file, I used to have a Vite plugin for that which ran it on buildStart which now would be called multiple times but it also didn't work because I think WXT checks if there's a _locales folder before startup.

@aklinker1
Copy link
Collaborator

I also utilize a small helper function to generate the _locales folder which downloads strings from my project's API and writes them into the file, I used to have a Vite plugin for that which ran it on buildStart which now would be called multiple times but it also didn't work because I think WXT checks if there's a _locales folder before startup.

I could add hooks for this, outside vite. Similar to nuxt's build hooks. Been hesitant to do this, since it's a large undertacking lol.

This is more of a question / feature task. Ideally I would like to utilize ESLint, TypeScript Typechecking and Prettier when developing a browser extension. Using something like vite-plugin-checker is what I use in most Vite projects for this task but with how the entry points work it would start said task for each entry point.

I use prettier, eslint, and Typescript on some projects and don't have any issues, but I don't run them before/during dev or build, which I assume you're doing if you're with vite-plugin-checker.

But that said, since there aren't any hooks, there isn't an equivalent to that plugin. I'll open a separate issue around adding some basic build hooks.

@aklinker1 aklinker1 mentioned this issue Feb 3, 2024
@Timeraa
Copy link
Member Author

Timeraa commented Feb 3, 2024

I also utilize a small helper function to generate the _locales folder which downloads strings from my project's API and writes them into the file, I used to have a Vite plugin for that which ran it on buildStart which now would be called multiple times but it also didn't work because I think WXT checks if there's a _locales folder before startup.

I could add hooks for this, outside vite. Similar to nuxt's build hooks. Been hesitant to do this, since it's a large undertacking lol.

This is more of a question / feature task. Ideally I would like to utilize ESLint, TypeScript Typechecking and Prettier when developing a browser extension. Using something like vite-plugin-checker is what I use in most Vite projects for this task but with how the entry points work it would start said task for each entry point.

I use prettier, eslint, and Typescript on some projects and don't have any issues, but I don't run them before/during dev or build, which I assume you're doing if you're with vite-plugin-checker.

But that said, since there aren't any hooks, there isn't an equivalent to that plugin. I'll open a separate issue around adding some basic build hooks.

Yeah vite-plugin-checker runs during compilation / dev mode, it does work just runs like 5 tasks for my project plus clears the console haha and I think the kill signal is broken with it

@aklinker1 aklinker1 mentioned this issue Feb 4, 2024
9 tasks
@aklinker1 aklinker1 linked a pull request Feb 4, 2024 that will close this issue
9 tasks
@aklinker1
Copy link
Collaborator

Released hooks in v0.16.3

@aklinker1 aklinker1 changed the title ESLint / Prettier / TypeCheck / Vite Plugins in general [vite-plugin-checker] ESLint / Prettier / TypeCheck / Vite Plugins in general Jul 6, 2024
@aklinker1 aklinker1 added the vite plugin Issue related to integrating a specific vite plugin label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vite plugin Issue related to integrating a specific vite plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants