Anyone have an idea why we would be seeing `typesc...
# help
d
Anyone have an idea why we would be seeing
typescript + eslint + prettier
working perfect in our stack/cdk code…
/cdk
but specifically prettier doesn’t seem to work in our
lambda
folder… Dir Structure:
Copy code
/lambdas/thing1/lambdacode.ts
/cdk/constructs/thing1.ts
tsconfig.json
Odd thing is that things are linting out in the console…. just not highlighting lines in the VSCode editor, or auto-correcting like they are for the cdk folder files.
@thdxr ☝️ How do you guys handle code formatting is SST itself? I didn’t see prettier so I’m curious. Are there any examples that anyone has where SST is linting with ESLint + Prettier for both CDK code and Lambda code?
@Frank Any ideas here? We’re dying with this atm. Really not sure what could cause it.. curious how you guys manage to avoid even needing to do it? Do you not want your SST code to be auto-formated/prettiered? Do you have any idea why we have it only working, as stated above, in only the cdk directory but the lambda dir is not working?
going to try giving our lambda dir its own package.json and tsconfig to see if that helps 🤷‍♂️
t
I'm not really sure what the issue is
I have a setup that's similar and it works
the typescript monorepo
d
any chance I can see your code so I can try to reverse engineer it?
but you don’t have prettier in your typescript monorepo
t
ah I just have it running in my editor
nothing special
d
hmmm… do you use VSCode as your editor?
I think perhaps that is the broken piece
t
no I use neovim
d
ah… I see in the example that the root tsconfig.json does not
include
the backend folder. How then does the lambda code get rebuilt/compiled as you are editing the SST/CDK code. Right now, editing either/or SST/TS rebuilds both cdk and lambda code.