Skip to content

Commit 18a6ef5

Browse files
committed
Convert to typescript and simplify toolchain
1 parent 6eb51d1 commit 18a6ef5

15 files changed

+3369
-4847
lines changed

.babelrc

Lines changed: 0 additions & 13 deletions
This file was deleted.

.eslintrc.json

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,29 @@
22
"extends": [
33
"plugin:github/browser",
44
"plugin:github/es6",
5-
"plugin:github/flow"
5+
"plugin:github/typescript"
66
],
7-
"parser": "babel-eslint",
7+
"globals": {
8+
"MarkdownToolbarElement": "readable",
9+
"MarkdownHeaderButtonElement": "readable",
10+
"MarkdownBoldButtonElement": "readable",
11+
"MarkdownItalicButtonElement": "readable",
12+
"MarkdownQuoteButtonElement": "readable",
13+
"MarkdownCodeButtonElement": "readable",
14+
"MarkdownLinkButtonElement": "readable",
15+
"MarkdownImageButtonElement": "readable",
16+
"MarkdownUnorderedListButtonElement": "readable",
17+
"MarkdownOrderedListButtonElement": "readable",
18+
"MarkdownTaskListButtonElement": "readable",
19+
"MarkdownMentionButtonElement": "readable",
20+
"MarkdownRefButtonElement": "readable"
21+
},
822
"overrides": [
923
{
1024
"files": "test/**/*.js",
1125
"rules": {
12-
"flowtype/require-valid-file-annotation": "off",
1326
"github/unescaped-html-literal": "off"
1427
}
15-
},
16-
{
17-
"files": "prettier.config.js",
18-
"rules": {
19-
"flowtype/require-valid-file-annotation": "off"
20-
}
2128
}
2229
]
2330
}

.flowconfig

Lines changed: 0 additions & 9 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@
4949
<script>
5050
const script = document.createElement('script')
5151
if (window.location.hostname.endsWith('github.io') || window.location.hostname.endsWith('github.com')) {
52-
script.src = "https://unpkg.com/@github/markdown-toolbar-element@latest/dist/index.umd.js"
52+
script.src = "https://unpkg.com/@github/markdown-toolbar-element@latest/dist/index.js"
5353
} else {
54-
script.src = "../dist/index.umd.js"
54+
script.src = "../dist/index.js"
5555
}
56+
script.type = 'module'
5657
document.body.appendChild(script)
5758
</script>
5859
</body>

index.d.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

index.js.flow

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)