Skip to content

Commit a55d034

Browse files
committed
chore: add file extensions to imports
1 parent 856533c commit a55d034

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

.github/linters/.eslintrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ rules:
4040
'eslint-comments/no-unused-disable': 'off',
4141
'i18n-text/no-en': 'off',
4242
'import/no-namespace': 'off',
43+
'import/no-unresolved': 'off',
4344
'no-console': 'off',
4445
'no-unused-vars': 'off',
4546
'prettier/prettier': 'error',

__tests__/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
import { describe, expect, it, vi } from 'vitest';
55

6-
import * as main from '../src/main';
6+
import * as main from '../src/main.js';
77

88
// Mock the action's entrypoint
99
const runMock = vi.spyOn(main, 'run').mockImplementation(async () => {});

__tests__/lib.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';
33
import * as core from '@actions/core';
44
import * as exec from '@actions/exec';
55

6-
import * as lib from '../src/lib';
6+
import * as lib from '../src/lib.js';
77

88
vi.mock('@actions/core');
99
vi.mock('@actions/exec');

__tests__/main.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import * as fs from 'node:fs';
55
import * as core from '@actions/core';
66
import { RequestError } from '@octokit/request-error';
77

8-
import * as lib from '../src/lib';
9-
import * as main from '../src/main';
10-
import { mockGetBooleanInput, mockGetInput } from './utils';
8+
import * as lib from '../src/lib.js';
9+
import * as main from '../src/main.js';
10+
import { mockGetBooleanInput, mockGetInput } from './utils.js';
1111

1212
const createCommit = vi.fn();
1313
const createRef = vi.fn();

src/main.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ import * as github from '@actions/github';
88
import { RequestError } from '@octokit/request-error';
99
import type { Endpoints } from '@octokit/types';
1010

11-
import { getHeadRef, getHeadSha, getHeadTreeHash, getStagedFiles } from './lib';
11+
import {
12+
getHeadRef,
13+
getHeadSha,
14+
getHeadTreeHash,
15+
getStagedFiles
16+
} from './lib.js';
1217

1318
type GitHubGitTreeType =
1419
Endpoints['POST /repos/{owner}/{repo}/git/trees']['parameters']['tree'];

0 commit comments

Comments
 (0)