Skip to content

Commit 9eec044

Browse files
authored
Merge pull request #62 from github/upgrade-packages-tests-exports
Upgrade packages tests exports
2 parents d534618 + 717b674 commit 9eec044

14 files changed

+7129
-9261
lines changed

.eslintrc.json

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,41 @@
11
{
22
"root": true,
3-
"plugins": ["custom-elements"],
43
"extends": [
5-
"plugin:github/recommended",
64
"plugin:github/browser",
5+
"plugin:github/recommended",
76
"plugin:github/typescript",
87
"plugin:custom-elements/recommended"
98
],
109
"rules": {
11-
"custom-elements/tag-name-matches-class": ["error", {"suffix": "Element"}],
12-
"custom-elements/file-name-matches-element": "off"
10+
"custom-elements/tag-name-matches-class": [
11+
"error",
12+
{
13+
"suffix": "Element"
14+
}
15+
],
16+
"custom-elements/define-tag-after-class-definition": "off",
17+
"custom-elements/no-method-prefixed-with-on": "off",
18+
"custom-elements/expose-class-on-global": "off",
19+
"import/extensions": ["error", "always"],
20+
"import/no-unresolved": "off"
1321
},
1422
"overrides": [
1523
{
16-
"files": "*.js",
17-
"parser": "espree",
18-
"parserOptions": {"ecmaVersion": 8}
24+
"files": "src/*-define.ts",
25+
"rules": {
26+
"@typescript-eslint/no-namespace": "off"
27+
}
28+
},
29+
{
30+
"files": "test/**/*.js",
31+
"rules": {
32+
"github/unescaped-html-literal": "off",
33+
"github/no-inner-html": "off",
34+
"i18n-text/no-en": "off"
35+
},
36+
"env": {
37+
"mocha": true
38+
}
1939
}
2040
]
2141
}

custom-elements-manifest.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default {
2+
packagejson: true,
3+
globs: ['src/*-element.ts'],
4+
plugins: [],
5+
}

custom-elements.json

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
{
2+
"schemaVersion": "1.0.0",
3+
"readme": "",
4+
"modules": [
5+
{
6+
"kind": "javascript-module",
7+
"path": "src/auto-check-element.ts",
8+
"declarations": [
9+
{
10+
"kind": "class",
11+
"description": "",
12+
"name": "AutoCheckElement",
13+
"members": [
14+
{
15+
"kind": "method",
16+
"name": "define",
17+
"static": true,
18+
"parameters": [
19+
{
20+
"name": "tag",
21+
"default": "'auto-check'"
22+
},
23+
{
24+
"name": "registry",
25+
"default": "customElements"
26+
}
27+
]
28+
},
29+
{
30+
"kind": "field",
31+
"name": "input",
32+
"type": {
33+
"text": "HTMLInputElement | null"
34+
},
35+
"readonly": true
36+
},
37+
{
38+
"kind": "field",
39+
"name": "src",
40+
"type": {
41+
"text": "string"
42+
}
43+
},
44+
{
45+
"kind": "field",
46+
"name": "csrf",
47+
"type": {
48+
"text": "string"
49+
}
50+
},
51+
{
52+
"kind": "field",
53+
"name": "required",
54+
"type": {
55+
"text": "boolean"
56+
}
57+
},
58+
{
59+
"kind": "field",
60+
"name": "csrfField",
61+
"type": {
62+
"text": "string"
63+
}
64+
}
65+
],
66+
"attributes": [
67+
{
68+
"name": "required"
69+
}
70+
],
71+
"superclass": {
72+
"name": "HTMLElement"
73+
},
74+
"customElement": true
75+
}
76+
],
77+
"exports": [
78+
{
79+
"kind": "js",
80+
"name": "AutoCheckElement",
81+
"declaration": {
82+
"name": "AutoCheckElement",
83+
"module": "src/auto-check-element.ts"
84+
}
85+
},
86+
{
87+
"kind": "js",
88+
"name": "default",
89+
"declaration": {
90+
"name": "AutoCheckElement",
91+
"module": "src/auto-check-element.ts"
92+
}
93+
}
94+
]
95+
}
96+
]
97+
}

0 commit comments

Comments
 (0)