Skip to content

Commit

Permalink
Merge pull request #98 from github/add-missing-extensions-to-modules
Browse files Browse the repository at this point in the history
add missing extensions to modules
  • Loading branch information
keithamus authored Mar 27, 2024
2 parents 38f2616 + 5acb2ef commit affdc3c
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 80 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"root": true,
"extends": ["plugin:github/browser", "plugin:github/recommended", "plugin:github/typescript"],
"rules": {
"import/no-unresolved": "off"
},
"overrides": [
{
"files": "*.js",
Expand All @@ -11,7 +14,6 @@
"files": "test/test.js",
"rules": {
"import/extensions": "off",
"import/no-unresolved": "off",
"github/no-inner-html": "off",
"eslint-comments/no-use": "off"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<textarea cols="50" rows="10">The examples can be found here.</textarea>

<script type="module">
import {subscribe} from '../dist/index.esm.js'
import {subscribe} from '../dist/index.js'
// import {subscribe} from 'https://unpkg.com/@github/paste-markdown/dist/index.esm.js'
subscribe(document.querySelector('textarea'))
</script>
Expand Down
59 changes: 0 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {install as installHTML, uninstall as uninstallHTML} from './paste-markdown-html'
import {install as installImageLink, uninstall as uninstallImageLink} from './paste-markdown-image-link'
import {install as installLink, uninstall as uninstallLink} from './paste-markdown-link'
import {install as installHTML, uninstall as uninstallHTML} from './paste-markdown-html.js'
import {install as installImageLink, uninstall as uninstallImageLink} from './paste-markdown-image-link.js'
import {install as installLink, uninstall as uninstallLink} from './paste-markdown-link.js'
import {
installAround as installSkipFormatting,
uninstall as uninstallSkipFormatting,
} from './paste-keyboard-shortcut-helper'
import {install as installTable, uninstall as uninstallTable} from './paste-markdown-table'
import {install as installText, uninstall as uninstallText} from './paste-markdown-text'
} from './paste-keyboard-shortcut-helper.js'
import {install as installTable, uninstall as uninstallTable} from './paste-markdown-table.js'
import {install as installText, uninstall as uninstallText} from './paste-markdown-text.js'
import {OptionConfig} from './option-config'

interface Subscription {
Expand Down
2 changes: 1 addition & 1 deletion src/paste-keyboard-shortcut-helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {OptionConfig} from './option-config'
import {OptionConfig} from './option-config.js'

const skipFormattingMap = new WeakMap<HTMLElement, boolean>()

Expand Down
4 changes: 2 additions & 2 deletions src/paste-markdown-html.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {insertText} from './text'
import {shouldSkipFormatting} from './paste-keyboard-shortcut-helper'
import {insertText} from './text.js'
import {shouldSkipFormatting} from './paste-keyboard-shortcut-helper.js'

export function install(el: HTMLElement): void {
el.addEventListener('paste', onPaste)
Expand Down
5 changes: 2 additions & 3 deletions src/paste-markdown-image-link.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* @flow strict */
import {insertText} from './text'
import {shouldSkipFormatting} from './paste-keyboard-shortcut-helper'
import {insertText} from './text.js'
import {shouldSkipFormatting} from './paste-keyboard-shortcut-helper.js'

export function install(el: HTMLElement): void {
el.addEventListener('dragover', onDragover)
Expand Down
6 changes: 3 additions & 3 deletions src/paste-markdown-link.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {OptionConfig} from './option-config'
import {insertText} from './text'
import {shouldSkipFormatting} from './paste-keyboard-shortcut-helper'
import {OptionConfig} from './option-config.js'
import {insertText} from './text.js'
import {shouldSkipFormatting} from './paste-keyboard-shortcut-helper.js'

const pasteLinkAsPlainTextOverSelectedTextMap = new WeakMap<HTMLElement, boolean>()

Expand Down
4 changes: 2 additions & 2 deletions src/paste-markdown-table.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {insertText} from './text'
import {shouldSkipFormatting} from './paste-keyboard-shortcut-helper'
import {insertText} from './text.js'
import {shouldSkipFormatting} from './paste-keyboard-shortcut-helper.js'

export function install(el: HTMLElement): void {
el.addEventListener('dragover', onDragover)
Expand Down
4 changes: 2 additions & 2 deletions src/paste-markdown-text.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {insertText} from './text'
import {shouldSkipFormatting} from './paste-keyboard-shortcut-helper'
import {insertText} from './text.js'
import {shouldSkipFormatting} from './paste-keyboard-shortcut-helper.js'

export function install(el: HTMLElement): void {
el.addEventListener('paste', onPaste)
Expand Down

0 comments on commit affdc3c

Please sign in to comment.