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

Update @openally/config.eslint #95

Merged
merged 1 commit into from
Jan 8, 2025
Merged
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
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);
});
});


Loading