We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am running knip on a TS application with the following knip & jest files:
knip.json
{ "$schema": "https://unpkg.com/knip@5/schema.json", "entry": ["src/server.ts", "src/commands/command.ts", "test/**/*.ts", "!test/mocks/**/*"], "paths": { "@/src/*": ["./src/*"], "@/test/*": ["./test/*"] }, "project": ["src/**/*.ts", "test/**/*.ts"], "husky": { "config": [".husky/pre-commit"] }, "prettier": { "config": [".prettierrc"] }, "eslint": { "config": [".eslintrc"] }, "jest": { "config": ["jest.config.js"] }, "ignoreDependencies": ["@instana/collector", "@side/jest-runtime"] }
jest.config.js
const { pathsToModuleNameMapper } = require('ts-jest'); const { compilerOptions } = require('./tsconfig.json'); module.exports = { transform: { '^.+\\.ts$': '@swc/jest', }, clearMocks: true, runtime: '@side/jest-runtime', testEnvironment: 'node', testPathIgnorePatterns: ['node_modules', 'dist'], verbose: false, collectCoverage: true, coverageReporters: ['clover', 'json', 'lcov', 'text', 'text-summary'], globalSetup: '<rootDir>/test/jest/globalSetup.ts', globalTeardown: '<rootDir>/test/jest/globalTeardown.ts', setupFiles: ['<rootDir>/test/jest/setupTests.ts'], moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }), };
I am getting a false positive, claiming @side/jest-runtime is an unused dev dependency, but is is mentioned in the jest config under the runtime key
runtime
The text was updated successfully, but these errors were encountered:
Thanks for the report, @mountEvarus.
This is the Jest plugin: https://github.com/webpro/knip/blob/main/packages/knip/src/plugins/jest/index.ts
Any chance you're up for a PR? No worries if not!
Sorry, something went wrong.
d766006
🚀 This issue has been resolved in v5.36.2. See Release 5.36.2 for release notes.
Using Knip in a commercial project? Please consider becoming a sponsor.
Successfully merging a pull request may close this issue.
I am running knip on a TS application with the following knip & jest files:
knip.json
jest.config.js
I am getting a false positive, claiming @side/jest-runtime is an unused dev dependency, but is is mentioned in the jest config under the
runtime
keyThe text was updated successfully, but these errors were encountered: