-
Notifications
You must be signed in to change notification settings - Fork 75
ci: Replace depcheck with knip #1294
New issue
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
base: main
Are you sure you want to change the base?
Conversation
acadb9d to
12f7573
Compare
e8bff47 to
9b8a893
Compare
ad15aa6 to
e6046ec
Compare
knip.config.json
Outdated
| @@ -0,0 +1,48 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #1294 (comment).
The comments from the config are gone now. I would prefer to have at least some kind of comment on why we are not activating the rules. A short summary of the purpose of this change in the commit message / PR description would be helpful (in short: This change is supposed to be a replacement for depcheck, so only those checks/rules are used, but in future also more checks of knip can be enabled).
This will help everyone, especially people who were not initially involved, to understand the reasons behind the changes and configuration.
In addition, it would be helpful to also add comments to the ignores to explain why they are needed.
For this reason, I would propose to rename the config to knip.config.jsonc, to be able to add comments, but still benefit from the JSON schema for validation. This seems to be supported by knip.
| "jsdoc": "npm run jsdoc-generate && open-cli dist/api/index.html", | ||
| "jsdoc-generate": "jsdoc -c jsdoc/jsdoc-workspace.json -t $(node -p 'path.dirname(require.resolve(\"docdash\"))') ./ || (echo 'Error during JSDoc generation! Check log.' && exit 1)", | ||
| "jsdoc-generate-gh-pages": "jsdoc -c jsdoc/jsdoc.json -t $(node -p 'path.dirname(require.resolve(\"docdash\"))') ./ || (echo 'Error during JSDoc generation! Check log.' && exit 1)", | ||
| "generate-cli-doc": "node ./scripts/generateCliDoc.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script should not have been removed, isn't it?
When adding back the script, the configuration for entry: ["scripts/*.js"] is not needed anymore as the script usage is detected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that happened when I reset the head
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that happened when I reset the head
JIRA: CPOUI5FOUNDATION-1126