You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Being the pnpm run types just tsc --noEmit command that works if invoked manually as it targets the folder and not individual files.
On the other hand, when invoked by lint-staged It tends to throw errors as it does ignore the tsconfig.ts. This is not a lint-staged bug but a limitation in tsc, as it is apparently not possible to target a file and config a project.
Steps to reproduce
in my case is a monorepo with nextjs but should happen in other scenarios where --skipLibCheck and --esModuleInterop are necessary
Environment
WSL windows and windows
node 18l
int staged version: 15.2.5
The text was updated successfully, but these errors were encountered:
Not sure I get what you mean, but if use the JS config format you can configure like this to avoid filenames:
exportdefault{"*.{js,jsx,ts,tsx}": ["eslint --fix","eslint"],"**/*.ts?(x)": (filenames)=>"pnpm run types",// do not pass filenames"*.json": ["prettier --write"]}
Description
When using lint-staged like this:
Being the pnpm run types just
tsc --noEmit
command that works if invoked manually as it targets the folder and not individual files.On the other hand, when invoked by lint-staged It tends to throw errors as it does ignore the tsconfig.ts. This is not a lint-staged bug but a limitation in tsc, as it is apparently not possible to target a file and config a project.
Steps to reproduce
in my case is a monorepo with nextjs but should happen in other scenarios where --skipLibCheck and --esModuleInterop are necessary
Environment
WSL windows and windows
node 18l
int staged version: 15.2.5
The text was updated successfully, but these errors were encountered: