Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

Commit 699741d

Browse files
authored
Merge pull request #15 from github/esm-import-extensions
2 parents 238cb02 + f7ce7dd commit 699741d

File tree

8 files changed

+14
-13
lines changed

8 files changed

+14
-13
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"extends": ["plugin:github/recommended", "plugin:github/typescript", "plugin:github/browser"],
55
"rules": {
66
"no-invalid-this": "off",
7-
"@typescript-eslint/no-invalid-this": ["error"]
7+
"@typescript-eslint/no-invalid-this": ["error"],
8+
"import/extensions": ["error", "always"]
89
},
910
"overrides": [
1011
{

src/html.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import {
55
processPropertyIdentity,
66
processBooleanAttribute
77
} from '@github/template-parts'
8-
import {processDirective} from './directive'
9-
import {processEvent} from './events'
8+
import {processDirective} from './directive.js'
9+
import {processEvent} from './events.js'
1010
import type {TemplatePart, TemplateTypeInit} from '@github/template-parts'
1111

1212
function processSubTemplate(part: TemplatePart, value: unknown): boolean {

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export {TemplateResult, html, render} from './html'
2-
export {isDirective, directive} from './directive'
3-
export {until} from './until'
4-
export {unsafeHTML} from './unsafe-html'
1+
export {TemplateResult, html, render} from './html.js'
2+
export {isDirective, directive} from './directive.js'
3+
export {until} from './until.js'
4+
export {unsafeHTML} from './unsafe-html.js'

src/unsafe-html.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {directive} from './directive'
1+
import {directive} from './directive.js'
22
import {NodeTemplatePart} from '@github/template-parts'
33
import type {TemplatePart} from '@github/template-parts'
44

src/until.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {processPart} from './html'
2-
import {directive} from './directive'
1+
import {processPart} from './html.js'
2+
import {directive} from './directive.js'
33
import type {TemplatePart} from '@github/template-parts'
44

55
const untils: WeakMap<TemplatePart, {i: number}> = new WeakMap()

test/html.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {html, render, directive} from '..'
1+
import {html, render, directive} from '../lib/index.js'
22

33
describe('html', () => {
44
it('creates new TemplateResults with each call', () => {

test/unsafe-html.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {html, render, unsafeHTML} from '..'
1+
import {html, render, unsafeHTML} from '../lib/index.js'
22

33
describe('unsafeHTML', () => {
44
it('renders basic text', async () => {

test/until.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {html, render, until} from '..'
1+
import {html, render, until} from '../lib/index.js'
22

33
describe('until', () => {
44
it('renders a Promise when it resolves', async () => {

0 commit comments

Comments
 (0)