-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
docs: add ESLint configuration section to installation docs #449
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @ollema, I thought about this recently but ultimately decided against it, because as you mentioned, we have to make a lot of assumptions that are outside the scope of this project. We don't want to be in the business of modifying/setting ESLint configs on the project's behalf. One thing we could do instead is add a section to the installation page of the docs, which would include something like 'Recommended ESLint Config' and include those pieces and why they are recommended! Will also loop in @AdrianGonz97 for his thoughts on this as well! |
Hey @ollema, are you wanting to add this to the docs or should we close this issue for now? |
sure, I can do that. I missed that suggestion in your original message |
We shouldn't be adding any eslint overrides to the components folder. We should fix any default rule errors in this code base. |
It's not an issue with this code base, it's an issue with the default eslint rules, which tbh will be resolved in Svelte 5 but in the meantime requires you to ignore the Here's an eslint config you can use to ignore these in your codebase, but we're not going to be modifying/messing with anyone's eslint config. |
d1610e2
to
f0c70a7
Compare
ready for review @huntabyte |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks man! Love the multiple options!
with this commit, a
.eslintrc
file should be added to the.../components/ui
folder when initialising a new project withnpx shadcn-svelte@latest init
.I write should because I do not know how to test this 😅 so I have coded it "blind"
I added this because it's a common problem that people run into, this solution works without modifying existing project wide
.eslintrc.cjs
files.a downside is that this is added without checking if the project uses
eslint
to begin with. a check for that could be added I guess!feel free to close if you dislike this idea - no problem