Skip to content

Commit ed6ffa2

Browse files
authored
chore: update @openally/config.eslint (#95)
1 parent 7fb1646 commit ed6ffa2

File tree

8 files changed

+12
-21
lines changed

8 files changed

+12
-21
lines changed

.eslintrc

Lines changed: 0 additions & 10 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { typescriptConfig } from "@openally/config.eslint";
2+
3+
export default typescriptConfig();

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"prepublishOnly": "npm run build",
1111
"test": "glob -c \"tsx --test\" \"./test/**/*.spec.ts\"",
1212
"coverage": "c8 --all -r html npm test",
13-
"lint": "eslint src/*.ts test/*.ts"
13+
"lint": "eslint src test"
1414
},
1515
"repository": {
1616
"type": "git",
@@ -27,7 +27,7 @@
2727
},
2828
"homepage": "https://github.com/dashlog/core#readme",
2929
"devDependencies": {
30-
"@nodesecure/eslint-config": "^1.9.0",
30+
"@openally/config.eslint": "^1.3.0",
3131
"@types/node": "^22.0.0",
3232
"c8": "^10.1.2",
3333
"glob": "^11.0.0",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type DashlogPlugins = keyof typeof plugins;
1212
export type DashlogOrganization<T extends object> = {
1313
logo: string;
1414
projects: DashlogRepository<T>[];
15-
}
15+
};
1616

1717
export interface IFetchOrgMetadataOptions<Plugins extends DashlogPlugins> {
1818
plugins: Plugins[];

src/plugins/nodesecure.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ const kScannerLock = new Mutex({ concurrency: 5 });
1010

1111
export type NodesecurePlugin = {
1212
nodesecure?: scanner.tarball.ScannedPackageResult;
13-
}
13+
};
1414

1515
export async function execute(
16-
orgName: string,
16+
_orgName: string,
1717
repository: DashlogRepository<NodesecurePlugin>
1818
) {
1919
if (repository.package_name === null) {

src/plugins/scorecard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { DashlogRepository } from "../services/repository.js";
66

77
export type ScorecardPlugin = {
88
scorecard?: scorecard.ScorecardResult | null;
9-
}
9+
};
1010

1111
export async function execute(
1212
orgName: string,

src/services/repository.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ export default class Repository {
9090
}
9191

9292
async #fetchLastGithubCommit() {
93-
// eslint-disable-next-line max-len
94-
const uri = `${this.#repository.commits_url.slice(0, this.#repository.commits_url.length - kCommitUrlPostfixLen)}?per_page=${kMaxCommitFetch}`;
93+
const url = new URL(this.#repository.commits_url.slice(0, this.#repository.commits_url.length - kCommitUrlPostfixLen));
94+
url.searchParams.set("per_page", kMaxCommitFetch.toString());
9595

9696
const { data: commits } = await httpie.get<Octokit.Endpoints["GET /repos/{owner}/{repo}/commits"]["response"]["data"]>(
97-
uri, { headers: this.#org.headers }
97+
url, { headers: this.#org.headers }
9898
);
9999
this.#commits = commits;
100100
const lastCommit = commits[0];

test/plugins/scorecard.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,3 @@ describe("execute()", async() => {
5353
assert.strictEqual(repo.plugins.scorecard, null);
5454
});
5555
});
56-
57-

0 commit comments

Comments
 (0)