web-infra-dev / rspress

🦀💨 A fast Rspack-based static site generator.
https://rspress.dev
MIT License
1.19k stars 108 forks source link

[Feature]: linting, formatting, husky, eslint and prettier #1165

Closed zmzlois closed 2 weeks ago

zmzlois commented 2 weeks ago

What problem does this feature solve?

when we create a rspress project, can we have eslint + prettier + default template comes with it to run through all the components and frontmatter?

ex: I would like husky to run npm run format for precommit message check

What does the proposed API look like?

Should comes with CLI

Timeless0911 commented 2 weeks ago

We do not expect to maintain these in the template, and users can choose any solutions and using them according to the corresponding official documents.

chenjiahan commented 2 weeks ago

Agreed, ESLint already provides a pretty nice initializer: npm init @eslint/config@latest

https://eslint.org/docs/latest/use/getting-started

And prettier setup is quite easy