web-components-doctor 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +150 -14
- package/dist/adapters/jsx-adapter.d.ts +20 -0
- package/dist/adapters/jsx-adapter.d.ts.map +1 -0
- package/dist/adapters/jsx-adapter.js +150 -0
- package/dist/adapters/jsx-adapter.js.map +1 -0
- package/dist/adapters/utils.d.ts +36 -0
- package/dist/adapters/utils.d.ts.map +1 -0
- package/dist/adapters/utils.js +58 -0
- package/dist/adapters/utils.js.map +1 -0
- package/dist/core/rule-factory.d.ts +10 -0
- package/dist/core/rule-factory.d.ts.map +1 -1
- package/dist/core/rule-factory.js +290 -144
- package/dist/core/rule-factory.js.map +1 -1
- package/dist/core/types.d.ts +12 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/descriptors/components.d.ts.map +1 -1
- package/dist/descriptors/components.js +47 -0
- package/dist/descriptors/components.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/rules/valid-slot-children.d.ts +13 -0
- package/dist/rules/valid-slot-children.d.ts.map +1 -0
- package/dist/rules/valid-slot-children.js +15 -0
- package/dist/rules/valid-slot-children.js.map +1 -0
- package/dist/rules/valid-slot-names.d.ts +13 -0
- package/dist/rules/valid-slot-names.d.ts.map +1 -0
- package/dist/rules/valid-slot-names.js +15 -0
- package/dist/rules/valid-slot-names.js.map +1 -0
- package/package.json +3 -1
|
@@ -22,6 +22,19 @@ export const componentDescriptors = {
|
|
|
22
22
|
accessibility: {
|
|
23
23
|
requireOneOf: ['label', 'aria-label', 'aria-labelledby'],
|
|
24
24
|
},
|
|
25
|
+
slots: [
|
|
26
|
+
{
|
|
27
|
+
name: '',
|
|
28
|
+
acceptedChildren: [
|
|
29
|
+
'sp-menu-item',
|
|
30
|
+
'sp-menu-group',
|
|
31
|
+
'sp-menu-divider',
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{ name: 'icon', acceptedChildren: ['sp-icon'] },
|
|
35
|
+
{ name: 'label' },
|
|
36
|
+
{ name: 'tooltip', acceptedChildren: ['sp-tooltip'] },
|
|
37
|
+
],
|
|
25
38
|
},
|
|
26
39
|
'sp-avatar': {
|
|
27
40
|
tagName: 'sp-avatar',
|
|
@@ -47,12 +60,27 @@ export const componentDescriptors = {
|
|
|
47
60
|
accessibility: {
|
|
48
61
|
requireOneOf: ['headline'],
|
|
49
62
|
},
|
|
63
|
+
slots: [
|
|
64
|
+
{ name: '' },
|
|
65
|
+
{ name: 'hero' },
|
|
66
|
+
{ name: 'heading' },
|
|
67
|
+
{ name: 'button', acceptedChildren: ['sp-button'] },
|
|
68
|
+
],
|
|
50
69
|
},
|
|
51
70
|
'sp-picker': {
|
|
52
71
|
tagName: 'sp-picker',
|
|
53
72
|
accessibility: {
|
|
54
73
|
requireOneOf: ['label', 'aria-label', 'aria-labelledby'],
|
|
55
74
|
},
|
|
75
|
+
slots: [
|
|
76
|
+
{
|
|
77
|
+
name: '',
|
|
78
|
+
acceptedChildren: ['sp-menu-item', 'sp-menu-group', 'sp-menu-divider'],
|
|
79
|
+
},
|
|
80
|
+
{ name: 'label' },
|
|
81
|
+
{ name: 'tooltip', acceptedChildren: ['sp-tooltip'] },
|
|
82
|
+
{ name: 'description' },
|
|
83
|
+
],
|
|
56
84
|
},
|
|
57
85
|
'sp-progress-bar': {
|
|
58
86
|
tagName: 'sp-progress-bar',
|
|
@@ -75,6 +103,9 @@ export const componentDescriptors = {
|
|
|
75
103
|
direction: ['horizontal', 'vertical'],
|
|
76
104
|
density: ['compact', 'regular'],
|
|
77
105
|
},
|
|
106
|
+
slots: [
|
|
107
|
+
{ name: '', acceptedChildren: ['sp-tab', 'sp-tab-panel'] },
|
|
108
|
+
],
|
|
78
109
|
},
|
|
79
110
|
'sp-theme': {
|
|
80
111
|
tagName: 'sp-theme',
|
|
@@ -88,9 +119,19 @@ export const componentDescriptors = {
|
|
|
88
119
|
'overlay-trigger': {
|
|
89
120
|
tagName: 'overlay-trigger',
|
|
90
121
|
requiredAttributes: ['triggered-by'],
|
|
122
|
+
slots: [
|
|
123
|
+
{ name: '', required: true },
|
|
124
|
+
{ name: 'click-content' },
|
|
125
|
+
{ name: 'hover-content' },
|
|
126
|
+
{ name: 'longpress-content' },
|
|
127
|
+
],
|
|
91
128
|
},
|
|
92
129
|
'sp-button': {
|
|
93
130
|
tagName: 'sp-button',
|
|
131
|
+
slots: [
|
|
132
|
+
{ name: '' },
|
|
133
|
+
{ name: 'icon', acceptedChildren: ['sp-icon'] },
|
|
134
|
+
],
|
|
94
135
|
deprecations: {
|
|
95
136
|
attributes: [
|
|
96
137
|
{
|
|
@@ -148,6 +189,12 @@ export const componentDescriptors = {
|
|
|
148
189
|
},
|
|
149
190
|
'sp-illustrated-message': {
|
|
150
191
|
tagName: 'sp-illustrated-message',
|
|
192
|
+
slots: [
|
|
193
|
+
{ name: '' },
|
|
194
|
+
{ name: 'heading' },
|
|
195
|
+
{ name: 'description' },
|
|
196
|
+
{ name: 'illustration', acceptedChildren: ['sp-icon', 'svg'] },
|
|
197
|
+
],
|
|
151
198
|
deprecations: {
|
|
152
199
|
attributes: [
|
|
153
200
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/descriptors/components.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA2B;IAC1D,gBAAgB,EAAE;QAChB,OAAO,EAAE,gBAAgB;QACzB,aAAa,EAAE;YACb,YAAY,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,iBAAiB,CAAC;SACzD;KACF;IAED,WAAW,EAAE;QACX,OAAO,EAAE,WAAW;QACpB,aAAa,EAAE;YACb,YAAY,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;YACxC,gBAAgB,EA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K,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;YAC1B,MAAM,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;SAChC;KACF;IAED,iBAAiB,EAAE;QACjB,OAAO,EAAE,iBAAiB;QAC1B,kBAAkB,EAAE,CAAC,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/descriptors/components.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA2B;IAC1D,gBAAgB,EAAE;QAChB,OAAO,EAAE,gBAAgB;QACzB,aAAa,EAAE;YACb,YAAY,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,iBAAiB,CAAC;SACzD;QACD,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,EAAE;gBACR,gBAAgB,EAAE;oBAChB,cAAc;oBACd,eAAe;oBACf,iBAAiB;iBAClB;aACF;YACD,EAAE,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,SAAS,CAAC,EAAE;YAC/C,EAAE,IAAI,EAAE,OAAO,EAAE;YACjB,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,YAAY,CAAC,EAAE;SACtD;KACF;IAED,WAAW,EAAE;QACX,OAAO,EAAE,WAAW;QACpB,aAAa,EAAE;YACb,YAAY,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;YACxC,gBAAgB,EAAE;gBAChB;oBACE,IAAI,EAAE,EAAE,aAAa,EAAE,CAAC,eAAe,EAAE,MAAM,CAAC,EAAE;oBAClD,YAAY,EAAE,CAAC,OAAO,CAAC;oBACvB,OAAO,EACL,yGAAyG;iBAC5G;aACF;SACF;KACF;IAED,iBAAiB,EAAE;QACjB,OAAO,EAAE,iBAAiB;QAC1B,aAAa,EAAE;YACb,YAAY,EAAE,CAAC,OAAO,CAAC;SACxB;KACF;IAED,mBAAmB,EAAE;QACnB,OAAO,EAAE,mBA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K,EAAE,QAAQ;4BACf,OAAO,EACL,qHAAqH;yBACxH;qBACF;iBACF;gBACD;oBACE,SAAS,EAAE,UAAU;oBACrB,OAAO,EACL,uGAAuG;iBAC1G;aACF;SACF;QACD,oBAAoB,EAAE;YACpB,OAAO,EAAE;gBACP,SAAS;gBACT,MAAM;gBACN,UAAU;gBACV,QAAQ;gBACR,UAAU;gBACV,QAAQ;gBACR,SAAS;gBACT,QAAQ;gBACR,SAAS;gBACT,QAAQ;aACT;SACF;KACF;CACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ declare const rules: {
|
|
|
15
15
|
'no-deprecated': import("eslint").Rule.RuleModule;
|
|
16
16
|
'required-attributes': import("eslint").Rule.RuleModule;
|
|
17
17
|
'valid-attribute-values': import("eslint").Rule.RuleModule;
|
|
18
|
+
'valid-slot-names': import("eslint").Rule.RuleModule;
|
|
19
|
+
'valid-slot-children': import("eslint").Rule.RuleModule;
|
|
18
20
|
};
|
|
19
21
|
declare const plugin: ESLint.Plugin;
|
|
20
22
|
/**
|
|
@@ -33,5 +35,5 @@ declare const plugin: ESLint.Plugin;
|
|
|
33
35
|
declare const configs: Record<string, Linter.Config>;
|
|
34
36
|
export default plugin;
|
|
35
37
|
export { rules, configs };
|
|
36
|
-
export type { ComponentDescriptor, ComponentDescriptorMap } from './core/types.js';
|
|
38
|
+
export type { ComponentDescriptor, ComponentDescriptorMap, SlotDescriptor, } from './core/types.js';
|
|
37
39
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAU7C,QAAA,MAAM,KAAK;;;;;;;CAOV,CAAC;AAoBF,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,MAOpB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAS1C,CAAC;AAIF,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC1B,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,GACf,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,29 +13,37 @@ import { accessibleComponent } from './rules/accessible-component.js';
|
|
|
13
13
|
import { noDeprecated } from './rules/no-deprecated.js';
|
|
14
14
|
import { requiredAttributes } from './rules/required-attributes.js';
|
|
15
15
|
import { validAttributeValues } from './rules/valid-attribute-values.js';
|
|
16
|
+
import { validSlotNames } from './rules/valid-slot-names.js';
|
|
17
|
+
import { validSlotChildren } from './rules/valid-slot-children.js';
|
|
16
18
|
const PLUGIN_NAME = 'swc';
|
|
17
19
|
const rules = {
|
|
18
20
|
'accessible-component': accessibleComponent,
|
|
19
21
|
'no-deprecated': noDeprecated,
|
|
20
22
|
'required-attributes': requiredAttributes,
|
|
21
23
|
'valid-attribute-values': validAttributeValues,
|
|
24
|
+
'valid-slot-names': validSlotNames,
|
|
25
|
+
'valid-slot-children': validSlotChildren,
|
|
22
26
|
};
|
|
23
27
|
const recommendedRules = {
|
|
24
28
|
[`${PLUGIN_NAME}/accessible-component`]: 'warn',
|
|
25
29
|
[`${PLUGIN_NAME}/no-deprecated`]: 'warn',
|
|
26
30
|
[`${PLUGIN_NAME}/required-attributes`]: 'warn',
|
|
27
31
|
[`${PLUGIN_NAME}/valid-attribute-values`]: 'warn',
|
|
32
|
+
[`${PLUGIN_NAME}/valid-slot-names`]: 'warn',
|
|
33
|
+
[`${PLUGIN_NAME}/valid-slot-children`]: 'warn',
|
|
28
34
|
};
|
|
29
35
|
const strictRules = {
|
|
30
36
|
[`${PLUGIN_NAME}/accessible-component`]: 'error',
|
|
31
37
|
[`${PLUGIN_NAME}/no-deprecated`]: 'error',
|
|
32
38
|
[`${PLUGIN_NAME}/required-attributes`]: 'error',
|
|
33
39
|
[`${PLUGIN_NAME}/valid-attribute-values`]: 'error',
|
|
40
|
+
[`${PLUGIN_NAME}/valid-slot-names`]: 'error',
|
|
41
|
+
[`${PLUGIN_NAME}/valid-slot-children`]: 'error',
|
|
34
42
|
};
|
|
35
43
|
const plugin = {
|
|
36
44
|
meta: {
|
|
37
45
|
name: 'web-components-doctor',
|
|
38
|
-
version: '0.
|
|
46
|
+
version: '0.3.0',
|
|
39
47
|
},
|
|
40
48
|
rules,
|
|
41
49
|
configs: {},
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE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W,EAAE;QACX,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE;QAClC,KAAK,EAAE,gBAAgB;KACxB;IACD,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE;QAClC,KAAK,EAAE,WAAW;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;AAEzB,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
export declare const validSlotChildren: import("eslint").Rule.RuleModule;
|
|
13
|
+
//# sourceMappingURL=valid-slot-children.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valid-slot-children.d.ts","sourceRoot":"","sources":["../../src/rules/valid-slot-children.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,eAAO,MAAM,iBAAiB,kCACqB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import { createValidSlotChildrenRule } from '../core/rule-factory.js';
|
|
13
|
+
import { componentDescriptors } from '../descriptors/components.js';
|
|
14
|
+
export const validSlotChildren = createValidSlotChildrenRule(componentDescriptors);
|
|
15
|
+
//# sourceMappingURL=valid-slot-children.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valid-slot-children.js","sourceRoot":"","sources":["../../src/rules/valid-slot-children.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,CAAC,MAAM,iBAAiB,GAC5B,2BAA2B,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
export declare const validSlotNames: import("eslint").Rule.RuleModule;
|
|
13
|
+
//# sourceMappingURL=valid-slot-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valid-slot-names.d.ts","sourceRoot":"","sources":["../../src/rules/valid-slot-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,eAAO,MAAM,cAAc,kCAAiD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import { createValidSlotNamesRule } from '../core/rule-factory.js';
|
|
13
|
+
import { componentDescriptors } from '../descriptors/components.js';
|
|
14
|
+
export const validSlotNames = createValidSlotNamesRule(componentDescriptors);
|
|
15
|
+
//# sourceMappingURL=valid-slot-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valid-slot-names.js","sourceRoot":"","sources":["../../src/rules/valid-slot-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,CAAC,MAAM,cAAc,GAAG,wBAAwB,CAAC,oBAAoB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-components-doctor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "ESLint plugin for Spectrum Web Components — catches accessibility gaps, deprecated APIs, and invalid attribute usage at lint time.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Adobe",
|
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
"web-components",
|
|
46
46
|
"accessibility",
|
|
47
47
|
"lit",
|
|
48
|
+
"jsx",
|
|
49
|
+
"react",
|
|
48
50
|
"a11y",
|
|
49
51
|
"spectrum-web-components"
|
|
50
52
|
],
|