Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: npm run check-licenses

- name: Perform dependency check
run: npm run depcheck
run: npm run knip

- name: Run unit tests
run: npm run test:unit:coverage
Expand Down
49 changes: 49 additions & 0 deletions knip.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const config = {
/**
* We only need dependency checking at the moment,
* so all checks except for dependencies are turned off.
*/
rules: {
files: "off",
duplicates: "off",
classMembers: "off",
unlisted: "off",
binaries: "off",
unresolved: "off",
catalog: "off",
exports: "off",
types: "off",
enumMembers: "off",
},

ignoreDependencies: [
/**
* Used in packages/middleware-code-coverage/test/integration/fixtures/ui5-app/package.json
* which is not part of the scope that knip analyzes
*/
"@ui5/cli",

/**
* Used via nyc ava --node-arguments="--experimental-loader=@istanbuljs/esm-loader-hook"
* which is not detected by knip as a usage of this package
*/
"@istanbuljs/esm-loader-hook"
],

workspaces: {
"packages/middleware-code-coverage": {
/**
* UI5 custom middleware entry (see packages/middleware-code-coverage/ui5.yaml)
*/
entry: ["lib/middleware.js"],
ava: {
config: [
"ava.config.js",
"ava-integration.config.js"
]
}
}
}
};

export default config;
Loading