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

fix: fixed knip #1854

Closed
wants to merge 2 commits into from
Closed
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
33 changes: 0 additions & 33 deletions .github/workflows/build.yml

This file was deleted.

23 changes: 14 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
"node": ">=20.10.0"
},
"scripts": {
"format": "run-s format:prettier format:lint",
"format": "run-s format:lint format:prettier format:cspell",
"format:cspell": "tsx .github/cspell.ts",
"format:lint": "eslint --fix .",
"format:prettier": "prettier --write .",
"prepare": "husky install",
"knip": "knip --config .github/knip.ts",
"knip-ci": "knip --no-exit-code --reporter json --config .github/knip.ts",
"test": "jest --setupFiles dotenv/config --coverage"
},
"keywords": [
Expand All @@ -23,28 +26,29 @@
"open-source"
],
"dependencies": {
"@mswjs/data": "0.16.1",
"@mswjs/data": "^0.16.1",
"@octokit/plugin-rest-endpoint-methods": "^13.2.6",
"@octokit/rest": "^20.0.2",
"dotenv": "^16.3.1",
"jest": "29.7.0",
"octokit": "^2.0.14",
"jest-md-dashboard": "^0.8.0",
"twitter-api-v2": "^1.16.0"
},
"devDependencies": {
"@actions/core": "^1.11.1",
"@commitlint/cli": "^17.4.4",
"@commitlint/config-conventional": "^17.4.4",
"@octokit/types": "^13.4.1",
"@types/jest": "29.5.12",
"@cspell/dict-node": "^5.0.5",
"@cspell/dict-software-terms": "^4.1.13",
"@cspell/dict-typescript": "^3.1.11",
"@jest/globals": "^29.7.0",
"@types/jest": "^29.5.12",
"@types/node": "^18.14.6",
"@types/twitter": "^1.7.4",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"cspell": "^8.15.3",
"esbuild": "^0.19.8",
"eslint": "^8.43.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-filename-rules": "^1.3.1",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-sonarjs": "^2.0.3",
"husky": "^8.0.3",
"jest-junit": "16.0.0",
Expand All @@ -53,6 +57,7 @@
"msw": "2.1.7",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"simple-git": "^3.27.0",
"ts-jest": "29.1.2",
"tsx": "^3.12.3",
"typescript": "^4.9.5"
Expand Down
76 changes: 0 additions & 76 deletions src/directory/set-state-changes.ts

This file was deleted.

9 changes: 4 additions & 5 deletions tests/devpool-issue-handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { updateDirectoryIssue } from "../src/directory/update-issue";

const DEVPOOL_OWNER_NAME = "ubiquity";
const DEVPOOL_REPO_NAME = "devpool-directory";
const UBIQUITY_TEST_REPO = "https://github.com/ubiquity/test-repo";

const server = setupServer(...handlers);

Expand Down Expand Up @@ -1279,7 +1278,7 @@ describe("createDevPoolIssue", () => {
} as GitHubIssue;

logSpy.mockClear();
await newDirectoryIssue(partnerIssue, partnerIssue.html_url, UBIQUITY_TEST_REPO, twitterMap);
await newDirectoryIssue(partnerIssue, partnerIssue.html_url, twitterMap);

expect(logSpy).toHaveBeenCalledWith(expect.stringContaining("Created"));
});
Expand All @@ -1295,7 +1294,7 @@ describe("createDevPoolIssue", () => {
});
logSpy.mockClear();

await newDirectoryIssue(partnerIssue, partnerIssue.html_url, UBIQUITY_TEST_REPO, twitterMap);
await newDirectoryIssue(partnerIssue, partnerIssue.html_url, twitterMap);

const devpoolIssue = db.issue.findFirst({
where: {
Expand Down Expand Up @@ -1323,7 +1322,7 @@ describe("createDevPoolIssue", () => {
body: partnerIssue.html_url,
});

await newDirectoryIssue(partnerIssue, partnerIssue.html_url, UBIQUITY_TEST_REPO, twitterMap);
await newDirectoryIssue(partnerIssue, partnerIssue.html_url, twitterMap);

const devpoolIssue = db.issue.findFirst({
where: {
Expand All @@ -1344,7 +1343,7 @@ describe("createDevPoolIssue", () => {
state: "closed",
} as GitHubIssue;

await newDirectoryIssue(partnerIssue, partnerIssue.html_url, UBIQUITY_TEST_REPO, twitterMap);
await newDirectoryIssue(partnerIssue, partnerIssue.html_url, twitterMap);

const devpoolIssue = db.issue.findFirst({
where: {
Expand Down
13 changes: 5 additions & 8 deletions tests/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,11 @@ describe("GitHub items", () => {
});

test("Get DevPool labels", () => {
const res = getDirectoryIssueLabelsFromPartnerIssue(
{
...githubDevpoolIssueTemplate,
html_url: "https://github.com/owner/repo",
node_id: "2",
},
"https://github.com/owner/repo"
);
const res = getDirectoryIssueLabelsFromPartnerIssue({
...githubDevpoolIssueTemplate,
html_url: "https://github.com/owner/repo",
node_id: "2",
});
expect(res).toMatchObject(["Pricing: 200 USD", "Partner: owner/repo", "id: 2", "Time: 1h"]);
});

Expand Down
Loading
Loading