Skip to content

Commit 7f6f159

Browse files
committed
lint cleanups
1 parent cb7de7b commit 7f6f159

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

jest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const config: Config.InitialOptions = {
1212
prefix: '<rootDir>/',
1313
}),
1414
transform: {
15-
"^.+\\.m?tsx?$": [
15+
'^.+\\.m?tsx?$': [
1616
'ts-jest',
1717
{
1818
useESM: true,

src/main.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ async function run(): Promise<void> {
1919
core.setOutput('metacpan-url', upload.metacpanUrl());
2020
}
2121

22-
void (async (): Promise<void> => {
23-
try {
24-
await run();
25-
} catch (error: any) {
22+
try {
23+
await run();
24+
} catch (error) {
25+
if (error instanceof Error) {
2626
core.setFailed(error.message);
27+
} else {
28+
core.setFailed('Unknown error!');
2729
}
28-
})();
30+
}

src/pause-client.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ async function getRequestData(
2727

2828
export class PAUSEClient {
2929
readonly #client: HttpClient;
30-
public uploadUrl: string =
31-
'https://pause.perl.org/pause/authenquery?ACTION=add_uri';
30+
public uploadUrl = 'https://pause.perl.org/pause/authenquery?ACTION=add_uri';
3231

33-
constructor(readonly username: string, password: string) {
32+
constructor(
33+
readonly username: string,
34+
password: string
35+
) {
3436
const credentials = new BasicCredentialHandler(username, password);
3537

3638
this.#client = new HttpClient('perl-actions/cpan-upload', [credentials]);

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"declaration": true,
66
"sourceMap": true,
77
"target": "es2019",
8-
"module": "es2020",
8+
"module": "es2022",
99
"moduleResolution": "node16",
1010
"types": ["node", "jest"],
1111
"strict": true,

0 commit comments

Comments
 (0)