Skip to content

Commit fd40be9

Browse files
committed
chore: update to eslint v9
1 parent 7f714c9 commit fd40be9

File tree

6 files changed

+18
-16
lines changed

6 files changed

+18
-16
lines changed

.eslintignore

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

.eslintrc

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

eslint.config.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import unjs from "eslint-config-unjs";
2+
3+
// https://github.com/unjs/eslint-config
4+
export default unjs({
5+
ignores: [],
6+
rules: {
7+
"unicorn/no-null": 0,
8+
"unicorn/prefer-top-level-await": 0,
9+
"unicorn/template-indent": 0,
10+
"unicorn/no-process-exit": 0
11+
},
12+
});

src/repo.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ export function getRepoConfig(repoUrl = ""): RepoConfig {
8989
let url;
9090
try {
9191
url = new URL(repoUrl);
92-
} catch {}
92+
} catch {
93+
// Ignore error
94+
}
9395

9496
const m = repoUrl.match(providerURLRegex)?.groups ?? {};
9597
if (m.repo && m.provider) {

src/semver.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export async function bumpVersion(
6161
if (config.newVersion) {
6262
pkg.version = config.newVersion;
6363
} else if (type || opts.preid) {
64-
// eslint-disable-next-line import/no-named-as-default-member
6564
pkg.version = semver.inc(currentVersion, type, opts.preid);
6665
config.newVersion = pkg.version;
6766
}

test/git.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe("git", () => {
5757
);
5858

5959
expect(
60-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
60+
6161
parsed.map(({ body: _, author: __, authors: ___, ...rest }) => rest)
6262
).toMatchObject([
6363
{
@@ -112,7 +112,7 @@ describe("git", () => {
112112
const commits = await getGitDiff(COMMIT_FROM, COMMIT_TO);
113113
commits[1].message =
114114
"fix(scope)!: breaking change example, close #123 (#134)";
115-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
115+
116116
expect(commits.map(({ body: _, ...rest }) => rest)).toMatchInlineSnapshot(`
117117
[
118118
{
@@ -203,7 +203,7 @@ describe("git", () => {
203203
});
204204
const parsed = parseCommits(commits, config);
205205

206-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
206+
207207
expect(parsed.map(({ body: _, author: __, authors: ___, ...rest }) => rest))
208208
.toMatchInlineSnapshot(`
209209
[

0 commit comments

Comments
 (0)