Document that public folders should be ignored by linters/formatters/assitance tools #2555
rkrisztian
started this conversation in
Ideas
Replies: 2 comments 1 reply
|
Hi, @rkrisztian. Thanks for proposing this. While I think that is a solid advice to mention somewhere, it has nothing to do with MSW. You should never lint your public directory regardless if you're using this library. It's common sense. Perhaps we could mention it on the Browser integration page. Would that work? |
0 replies
|
Yes, that makes sense to me. I think I was essentially proposing the same thing. Maybe with the addition that markers like |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Scope
Improves an existing behavior
Compatibility
Feature description
In issue #2345, it was suggested that
npx msw init public/ --savecreatespublic/mockServiceWorker.jswith markers added to make tools like ESLint ignore the whole file:However, with new tools emerging like Biome, I don't think this solution will scale well. I just want to agree with @kettanaito, because you can't possibly address all such tools. Instead, the documentation should include some extra guidance, like, configuring linter/formatter/assistance tools to ignore public folders completely (if that's not already the case). For example, in Biome you can do something like this (assuming
vsc.useIgnoreFileis already enabled to keep my example simple):{ "files": { "includes": ["**", "!public"] } }All reactions