Alexander Kachkaev
Alexander Kachkaev
Oh I did not know about this option! Indeed, setting this in `knip.config.ts` for a workspace works like a charm! ```ts next: { entry: [ // https://github.com/webpro-nl/knip/issues/960 "src/instrumentation.handler.ts", "src/pages/**/*.handler.ts", "src/pages/**/*.page.tsx",...
Just found a remaining edge case: `"instrumentation.handler.ts"` is not being picked up as an entry point: ``` Unused files (1) apps/frontend/src/instrumentation.handler.ts ``` Relevant source: https://github.com/webpro-nl/knip/blob/b1ee77635954df6bd5328b65ad456c9ea1d95906/packages/knip/src/plugins/next/index.ts#L18-L34 I believe that `'{instrumentation,instrumentation-client,middleware,proxy}.{js,ts}'` should...
I just upgraded to Node 20, used `import.meta.dirname`, ran unit tests and all worked there. TypeScript linter did not complain as well, so I committed and pushed. Surprisingly, `next build`...
Looks like turbopack does not know about `import.meta.dirname` and `import.meta.filename` too. They return undefined in `next dev --turbo` as of v 14.2.0. And because webpack config is ignored by `--turbo`,...
Side observation: I removed `"name"` from `packages/c/package.json` just to see what happens. `pnpm manypkg check` produced this: ``` ☔️ error PackageJsonMissingNameError: The following package.jsons are missing the "name" field: ☔️...
👋 @Jack-Works! Try ```ts await require('prettier').resolveConfigFile(require('path').resolve(process.cwd(), 'foobar.json')) ``` Config file is resolved relative to a file path, not dir path. - [docs](https://prettier.io/docs/en/api.html#prettierresolveconfigfilefileurlorpath) - [source](https://github.com/prettier/prettier/blob/80bdbfe312ed1b20d6f4111912121a574541d8c6/src/config/resolve-config.js#L78-L84)
This issue also applies to [`eslint-plugin-react-compiler`](https://www.npmjs.com/package/eslint-plugin-react-compiler). A fix could cover both packages at once.
@michaelfaith, #30774 is in. Are you still up for adding typings to `eslint-plugin-react-hooks` and `eslint-plugin-react-compiler`? Happy to help if you no longer have enough capacity.
Yeah that could work locally, but I’m not sure if Dependabot will be able to use the plugin. They don’t run custom repo code for security reasons. A locally installed...
Thanks @ambar! A plugin can definitely help in some scenarios but unfortunately it does not cover the whole problem space. Dependabot (or other hosted tools) need to be able to...