Skip to content

Commit

Permalink
chore: update @openally/config.eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
fabnguess committed Jan 7, 2025
1 parent 7fb1646 commit f5de503
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 21 deletions.
10 changes: 0 additions & 10 deletions .eslintrc

This file was deleted.

3 changes: 3 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { typescriptConfig } from "@openally/config.eslint";

export default typescriptConfig();
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prepublishOnly": "npm run build",
"test": "glob -c \"tsx --test\" \"./test/**/*.spec.ts\"",
"coverage": "c8 --all -r html npm test",
"lint": "eslint src/*.ts test/*.ts"
"lint": "eslint src test"
},
"repository": {
"type": "git",
Expand All @@ -27,7 +27,7 @@
},
"homepage": "https://github.com/dashlog/core#readme",
"devDependencies": {
"@nodesecure/eslint-config": "^1.9.0",
"@openally/config.eslint": "^1.3.0",
"@types/node": "^22.0.0",
"c8": "^10.1.2",
"glob": "^11.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type DashlogPlugins = keyof typeof plugins;
export type DashlogOrganization<T extends object> = {
logo: string;
projects: DashlogRepository<T>[];
}
};

export interface IFetchOrgMetadataOptions<Plugins extends DashlogPlugins> {
plugins: Plugins[];
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/nodesecure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ const kScannerLock = new Mutex({ concurrency: 5 });

export type NodesecurePlugin = {
nodesecure?: scanner.tarball.ScannedPackageResult;
}
};

export async function execute(
orgName: string,
_orgName: string,
repository: DashlogRepository<NodesecurePlugin>
) {
if (repository.package_name === null) {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/scorecard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DashlogRepository } from "../services/repository.js";

export type ScorecardPlugin = {
scorecard?: scorecard.ScorecardResult | null;
}
};

export async function execute(
orgName: string,
Expand Down
6 changes: 3 additions & 3 deletions src/services/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ export default class Repository {
}

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

const { data: commits } = await httpie.get<Octokit.Endpoints["GET /repos/{owner}/{repo}/commits"]["response"]["data"]>(
uri, { headers: this.#org.headers }
url, { headers: this.#org.headers }
);
this.#commits = commits;
const lastCommit = commits[0];
Expand Down
2 changes: 0 additions & 2 deletions test/plugins/scorecard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,3 @@ describe("execute()", async() => {
assert.strictEqual(repo.plugins.scorecard, null);
});
});


0 comments on commit f5de503

Please sign in to comment.