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.

Include file extension in all imports #15

Merged
merged 2 commits into from
Jan 26, 2022
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
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"extends": ["plugin:github/recommended", "plugin:github/typescript", "plugin:github/browser"],
"rules": {
"no-invalid-this": "off",
"@typescript-eslint/no-invalid-this": ["error"]
"@typescript-eslint/no-invalid-this": ["error"],
"import/extensions": ["error", "always"]
},
"overrides": [
{
Expand Down
4 changes: 2 additions & 2 deletions src/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
processPropertyIdentity,
processBooleanAttribute
} from '@github/template-parts'
import {processDirective} from './directive'
import {processEvent} from './events'
import {processDirective} from './directive.js'
import {processEvent} from './events.js'
import type {TemplatePart, TemplateTypeInit} from '@github/template-parts'

function processSubTemplate(part: TemplatePart, value: unknown): boolean {
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export {TemplateResult, html, render} from './html'
export {isDirective, directive} from './directive'
export {until} from './until'
export {unsafeHTML} from './unsafe-html'
export {TemplateResult, html, render} from './html.js'
export {isDirective, directive} from './directive.js'
export {until} from './until.js'
export {unsafeHTML} from './unsafe-html.js'
2 changes: 1 addition & 1 deletion src/unsafe-html.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {directive} from './directive'
import {directive} from './directive.js'
import {NodeTemplatePart} from '@github/template-parts'
import type {TemplatePart} from '@github/template-parts'

Expand Down
4 changes: 2 additions & 2 deletions src/until.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {processPart} from './html'
import {directive} from './directive'
import {processPart} from './html.js'
import {directive} from './directive.js'
import type {TemplatePart} from '@github/template-parts'

const untils: WeakMap<TemplatePart, {i: number}> = new WeakMap()
Expand Down
2 changes: 1 addition & 1 deletion test/html.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {html, render, directive} from '..'
import {html, render, directive} from '../lib/index.js'

describe('html', () => {
it('creates new TemplateResults with each call', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/unsafe-html.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {html, render, unsafeHTML} from '..'
import {html, render, unsafeHTML} from '../lib/index.js'

describe('unsafeHTML', () => {
it('renders basic text', async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/until.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {html, render, until} from '..'
import {html, render, until} from '../lib/index.js'

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