Sebastian
Sebastian2mo ago

Lint does not ignore `**/*.gen.ts` files as expected

I’m trying to configure Deno’s linter to ignore all files matching ‎**/*.gen.ts. I have a hard time making it ignore generated files. Here’s the relevant part of my ‎deno.json:
{
"lint": {
"exclude": [
"**/*.gen.ts"
]
}
}
{
"lint": {
"exclude": [
"**/*.gen.ts"
]
}
}
Environment: - Deno version: deno 2.3.3 - OS: 15.5 (24F74) - Editor: Zed I've created a mock repo here: https://github.com/bastianplsfix/postera/blob/main/www/deno.json
GitHub
postera/www/deno.json at main · bastianplsfix/postera
Contribute to bastianplsfix/postera development by creating an account on GitHub.
No description
5 Replies
Sebastian
SebastianOP2mo ago
As I posted this I might realise its the LSP...
marvinh.
marvinh.2mo ago
cc @nayeemrmn
Sebastian
SebastianOP2mo ago
For anyone using Tanstack Router, adding addExtensions:true in your config will add .tsx extentions in the generated file to satisfy Deno.
router({
target: "react",
autoCodeSplitting: true,
addExtensions: true,
}),
router({
target: "react",
autoCodeSplitting: true,
addExtensions: true,
}),
PaYe-Eth
PaYe-Eth2mo ago
Yes mate any progress yet dude? @Sebastian
Sebastian
SebastianOP2mo ago
Sort of. Seems like it does not lint my .gen.ts files. However I cannot tell it to don't care about sloppy imports. For this case with routeTree.gen.ts from Tanstack Router I was able to tell it to generate the file with proper endings so Deno won't complain on sloppy imports. I do follow the guides in the tutorials at Deno Docs but I find these weird quirks here and there for compat. One thing I learned yesterday was there is a Deno Vite plugin for resolving aliases which was kinda hidden. I think more people would like to be aware of that. My newest issue now is when you do manual setup of a react project with tanstack router and query using Deno I cannot for the life of me get React.useState to work.

Did you find this page helpful?