Skip to content

Commit 6c0e526

Browse files
authored
Merge pull request #26 from github/modern-js
Update for modern browsers
2 parents fb96b5a + ee058fb commit 6c0e526

File tree

9 files changed

+339
-376
lines changed

9 files changed

+339
-376
lines changed

.babelrc

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
{
22
"env": {
33
"esm": {
4-
"plugins": [
5-
"transform-custom-element-classes"
6-
],
7-
"presets": [
8-
["@babel/env", {"modules": false}],
9-
"@babel/flow"
10-
]
4+
"presets": ["github"]
115
},
126
"umd": {
137
"plugins": [
14-
"transform-custom-element-classes",
158
"@babel/plugin-transform-modules-umd"
169
],
17-
"presets": ["@babel/env", "@babel/flow"]
10+
"presets": ["github"]
1811
}
1912
}
2013
}

.eslintrc.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
{
22
"extends": [
3+
"plugin:github/browser",
34
"plugin:github/es6",
4-
"plugin:github/browser"
5+
"plugin:github/flow"
56
],
6-
"parser": "babel-eslint"
7+
"overrides": [
8+
{
9+
"files": "test/**/*.js",
10+
"rules": {
11+
"flowtype/require-valid-file-annotation": "off"
12+
}
13+
},
14+
{
15+
"files": "test/**/*.js",
16+
"excludedFiles": "test/karma.config.js",
17+
"env": {
18+
"mocha": true
19+
},
20+
"globals": {
21+
"assert": true
22+
}
23+
}
24+
]
725
}

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ Browsers without native [custom element support][support] require a [polyfill][]
9292
- Chrome
9393
- Firefox
9494
- Safari
95-
- Internet Explorer 11
9695
- Microsoft Edge
9796

9897
[support]: https://caniuse.com/#feat=custom-elementsv1

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* @flow */
1+
/* @flow strict */
22

33
class DetailsMenuElement extends HTMLElement {
44
constructor() {

index.js.flow

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
/* @flow */
1+
/* @flow strict */
22

33
declare class DetailsMenuElement extends HTMLElement {
44
get preload(): boolean;
55
set preload(value: boolean): void;
66
get src(): string;
77
set src(url: string): void;
88
}
9+
10+
declare module '@github/details-menu-element' {
11+
declare export default typeof DetailsMenuElement
12+
}

0 commit comments

Comments
 (0)