Skip to content
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

Knip Report #28

Closed
0x4007 opened this issue Mar 6, 2024 · 7 comments · Fixed by #29
Closed

Knip Report #28

0x4007 opened this issue Mar 6, 2024 · 7 comments · Fixed by #29

Comments

@0x4007
Copy link
Member

0x4007 commented Mar 6, 2024

Handle all of these either by removing them (ideal) or by ignoring them etc if they must be. For example, the eslint stuff probably needs to be ignored since its not used at runtime, but instead, during commits in development.


Unused devDependencies (5)

Filename devDependencies
package.json @mswjs/data
@types/jest
eslint-config-prettier
eslint-plugin-prettier
ts-node

Unlisted dependencies (1)

Filename unlisted
tests/main.test.ts @jest/globals

Originally posted by @github-actions[bot] in #27 (comment)

@gentlementlegen
Copy link
Member

/start

Copy link

ubiquibot bot commented Mar 8, 2024

DeadlineFri, Mar 8, 10:21 AM UTC
Registered Wallet 0x0fC1b909ba9265A846b82CF4CE352fc3e7EeB2ED
Tips:
  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

@gentlementlegen
Copy link
Member

@pavlovcik So to address all of the issues:

  • Jest and Eslint related messages can be safely ignored according to the docs https://knip.dev/guides/handling-issues#eslint--jest
  • ts-node is still needed by jest to understand the .ts config, and there seem to be no workaround for this except having a js file
  • @mswjs/data is used in the code but ignored by knip because it is located in the mocks folder

What I did in the end is adding all of them to the ignored dependencies, I don't see a better solution at least for now.

Another option would be to use the new eslint flat configuration. But this requires to have a js file with the config which I know you don't like: https://github.com/prettier/eslint-plugin-prettier?tab=readme-ov-file#configuration-new-eslintconfigjs

@0x4007
Copy link
Member Author

0x4007 commented Mar 8, 2024

Okay so regarding ts-node can we do a json config?

@gentlementlegen
Copy link
Member

@pavlovcik Just changed the configuration of Jest to be done through a JSON file.

Copy link

ubiquibot bot commented Mar 8, 2024

+ Evaluating results. Please wait...

Copy link

ubiquibot bot commented Mar 8, 2024

[ 30 WXDAI ]

@pavlovcik
Contributions Overview
ViewContributionCountReward
IssueSpecification127.8
IssueComment12.2
Conversation Incentives
CommentFormattingRelevanceReward
Handle all of these either by removing them (ideal) or by ignori...
27.8
h3:
  count: 2
  score: "2"
  words: 6
code:
  count: 6
  score: "6"
  words: 14
td:
  count: 4
  score: "4"
  words: 44
hr:
  count: 1
  score: "1"
  words: 0
127.8
Okay so regarding ts-node can we do a json config?...
2.20.82.2

[ 87.3 WXDAI ]

@FernandVEYRIER
Contributions Overview
ViewContributionCountReward
IssueTask150
IssueComment20
IssueComment225.7
ReviewComment15.8
ReviewComment15.8
Conversation Incentives
CommentFormattingRelevanceReward
@pavlovcik So to address all of the issues: - Jest and Eslint r...
-
li:
  count: 3
  score: "0"
  words: 76
code:
  count: 7
  score: "0"
  words: 9
0.87-
@pavlovcik Just changed the configuration of Jest to be done thr...
-0.63-
@pavlovcik So to address all of the issues: - Jest and Eslint r...
24.3
li:
  count: 3
  score: "3"
  words: 76
code:
  count: 7
  score: "7"
  words: 9
0.8724.3
@pavlovcik Just changed the configuration of Jest to be done thr...
1.40.631.4
@pavlovcik The results from Knip seem to be empty and clean yet ...
5.80.355.8
@pavlovcik The results from Knip seem to be empty and clean yet ...
5.80.355.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants