Skip to content
Open
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 @@ -56,7 +56,7 @@ jobs:
run: npm run check-licenses

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

- name: Run unit tests
run: npm run coverage
Expand Down
7 changes: 7 additions & 0 deletions internal/benchmark/knip.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import commonConfig from "../../knip.common.config.js";

commonConfig.ignoreDependencies.push(
"eslint"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not expect that we need to ignore eslint, as it is used. Maybe the plugin needs to be configured differently? https://knip.dev/reference/plugins/eslint
In our setup we have also a eslint.common.config.js, which doesn't match the default patterns.

In case you already checked this, please add a comment that describes why it still needs to be ignored here.

);

export default commonConfig;
8 changes: 4 additions & 4 deletions internal/benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
"ui5-cli-benchmark": "./cli.js"
},
"scripts": {
"test": "npm run lint && npm run coverage && npm run depcheck",
"test": "npm run lint && npm run coverage",
"unit": "node --test 'test/e2e/**/*.js'",
"unit-watch": "node --test --watch 'test/e2e/**/*.js'",
"coverage": "node --test --experimental-test-coverage 'test/e2e/**/*.js'",
"lint": "eslint .",
"depcheck": "depcheck"
"knip": "knip --config knip.config.js"
},
"dependencies": {
"js-yaml": "^4.1.1"
},
"devDependencies": {
"depcheck": "^1.4.7",
"eslint": "^9.39.1"
"eslint": "^9.39.1",
"knip": "^5.83.1"
}
}
10 changes: 10 additions & 0 deletions internal/documentation/knip.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import commonConfig from "../../knip.common.config.js";

commonConfig.ignoreDependencies.push(
"docdash",
"jsdoc",
"open-cli",
"cssnano",
);

export default commonConfig;
3 changes: 2 additions & 1 deletion internal/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"scripts": {
"start": "vitepress dev --open",
"lint": "eslint .",
"depcheck": "depcheck --ignores @ui5/documentation,vitepress,docdash,jsdoc,open-cli,handlebars,@types/node,@ui5/webcomponents,autoprefixer,cssnano,@theme/components",
"knip": "knip --config knip.config.js",
"dev": "vitepress dev",
"build:vitepress": "vitepress build",
"build:assets": "sh -c 'DEST_DIR=${1:-./dist}; cp -r ./docs/images \"$DEST_DIR/images\"' --",
Expand Down Expand Up @@ -53,6 +53,7 @@
"docdash": "^2.0.2",
"handlebars": "^4.7.8",
"jsdoc": "^4.0.4",
"knip": "^5.83.1",
"open-cli": "^8.0.0",
"traverse": "^0.6.11"
}
Expand Down
7 changes: 7 additions & 0 deletions internal/shrinkwrap-extractor/knip.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import commonConfig from "../../knip.common.config.js";

commonConfig.ignoreDependencies.push(
"eslint"
);

export default commonConfig;
8 changes: 4 additions & 4 deletions internal/shrinkwrap-extractor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"directory": "internal/shrinkwrap-extractor"
},
"scripts": {
"test": "npm run lint && npm run coverage && npm run depcheck",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the script execution in the test script. The idea of test is to cover all checks of a package in one script. This is currently only used locally, as we use separate steps (with individual npm run commands) in our GitHub Actions CI.

(same comment for all other occurrences of this removal)

"test": "npm run lint && npm run coverage",
"unit": "node --test test/lib/convertToShrinkwrap.js",
"unit-watch": "node --test --watch test/lib/convertToShrinkwrap.js",
"coverage": "node --test --experimental-test-coverage 'test/lib/convertToShrinkwrap.js'",
"lint": "eslint .",
"depcheck": "depcheck"
"knip": "knip --config knip.config.js"
},
"keywords": [
"npm",
Expand All @@ -44,7 +44,7 @@
"pacote": "^21.0.4"
},
"devDependencies": {
"depcheck": "^1.4.7",
"eslint": "^9.39.1"
"eslint": "^9.39.1",
"knip": "^5.83.1"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading