@marko/language-server 1.1.7 → 1.1.9
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/dist/index.d.ts +1 -1
- package/dist/index.js +291 -389
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +235 -334
- package/dist/index.mjs.map +4 -4
- package/dist/service/html/axe-rules/axe-rules.d.ts +202 -222
- package/dist/service/html/axe-rules/rule-exceptions.d.ts +15 -0
- package/dist/ts-plugin/index.d.ts +1 -0
- package/dist/utils/project-defaults.d.ts +1 -0
- package/package.json +13 -13
- package/dist/service/html/axe-rules/separated-rules.d.ts +0 -48
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as r from "./axe-rules";
|
|
2
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
3
|
+
type AllRules = UnionToIntersection<(typeof r)[keyof typeof r]>;
|
|
4
|
+
type RuleId = AllRules[keyof AllRules];
|
|
5
|
+
export interface Exceptions {
|
|
6
|
+
dynamicAttrs?: string[];
|
|
7
|
+
attrSpread?: boolean;
|
|
8
|
+
unknownBody?: boolean;
|
|
9
|
+
}
|
|
10
|
+
type Blacklist = typeof r.structure.frameTested | typeof r.aria.ariaRequiredParent | typeof r.forms.label | typeof r.forms.labelTitleOnly | typeof r.forms.selectName | typeof r.keyboard.bypass | typeof r.keyboard.nestedInteractive | typeof r.keyboard.region | typeof r.semantics.headingOrder | typeof r.semantics.landmarkBannerIsTopLevel | typeof r.semantics.landmarkComplementaryIsTopLevel | typeof r.semantics.landmarkContentinfoIsTopLevel | typeof r.semantics.landmarkMainIsTopLevel | typeof r.semantics.landmarkOneMain | typeof r.semantics.pageHasHeadingOne | typeof r.structure.dlitem | typeof r.structure.listitem | typeof r.tables.tdHasHeader | typeof r.tables.tdHeadersAttr | typeof r.aria.ariaRoledescription | typeof r.aria.ariaValidAttr | typeof r.color.colorContrast | typeof r.color.colorContrastEnhanced | typeof r.color.linkInTextBlock | typeof r.keyboard.scrollableRegionFocusable | typeof r.parsing.duplicateId | typeof r.parsing.duplicateIdActive | typeof r.parsing.duplicateIdAria | typeof r.semantics.pAsHeading | typeof r.sensoryAndVisualCues.targetSize | typeof r.structure.avoidInlineSpacing | typeof r.structure.cssOrientationLock | typeof r.structure.hiddenContent | typeof r.aria.ariaValidAttrValue;
|
|
11
|
+
type Whitelist = Exclude<RuleId, Blacklist>;
|
|
12
|
+
export declare const ruleExceptions: {
|
|
13
|
+
[id in Whitelist]: Exceptions;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/language-server",
|
|
3
3
|
"description": "Marko Language Server",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.9",
|
|
5
5
|
"bin": {
|
|
6
6
|
"marko-language-server": "./bin.js"
|
|
7
7
|
},
|
|
8
8
|
"bugs": "https://github.com/marko-js/language-server/issues/new?template=Bug_report.md",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@babel/helper-validator-identifier": "^7.22.20",
|
|
11
|
-
"@marko/language-tools": "^2.1.
|
|
12
|
-
"@marko/babel-utils": "^6.3.
|
|
13
|
-
"@marko/compiler": "^5.
|
|
14
|
-
"@marko/translator-default": "^5.31.
|
|
15
|
-
"htmljs-parser": "^5.5.
|
|
16
|
-
"marko": "^5.
|
|
17
|
-
"prettier": "^
|
|
18
|
-
"prettier-plugin-marko": "^
|
|
11
|
+
"@marko/language-tools": "^2.1.7",
|
|
12
|
+
"@marko/babel-utils": "^6.3.4",
|
|
13
|
+
"@marko/compiler": "^5.34.1",
|
|
14
|
+
"@marko/translator-default": "^5.31.8",
|
|
15
|
+
"htmljs-parser": "^5.5.1",
|
|
16
|
+
"marko": "^5.32.0",
|
|
17
|
+
"prettier": "^3.1.0",
|
|
18
|
+
"prettier-plugin-marko": "^3.1.2",
|
|
19
19
|
"relative-import-path": "^1.0.0",
|
|
20
20
|
"strip-json-comments": "^3.1.1",
|
|
21
|
-
"typescript": "^5.
|
|
22
|
-
"vscode-css-languageservice": "^6.2.
|
|
21
|
+
"typescript": "^5.3.2",
|
|
22
|
+
"vscode-css-languageservice": "^6.2.11",
|
|
23
23
|
"vscode-languageserver": "^9.0.1",
|
|
24
24
|
"vscode-languageserver-textdocument": "^1.0.11",
|
|
25
|
-
"vscode-uri": "^3.0.
|
|
25
|
+
"vscode-uri": "^3.0.8"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/prettier": "^2.7.3",
|
|
29
|
-
"tsx": "^
|
|
29
|
+
"tsx": "^4.6.2"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
".": {
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a manually curated list of rules in `axe-core`,
|
|
3
|
-
* separated by their dependence on dynamic content instead
|
|
4
|
-
* of static HTML.
|
|
5
|
-
*
|
|
6
|
-
* Each rule should be placed in one and only one category.
|
|
7
|
-
* Categories are in order of least to most restrictive, so
|
|
8
|
-
* rules should be placed in the earliest category where they
|
|
9
|
-
* are still properly ignored near dynamic content
|
|
10
|
-
*/
|
|
11
|
-
declare const rules: {
|
|
12
|
-
/**
|
|
13
|
-
* These rules can be evaluated against any component.
|
|
14
|
-
*/
|
|
15
|
-
alwaysAllowed: string[];
|
|
16
|
-
/**
|
|
17
|
-
* These rules can't be resolved with a spread operator
|
|
18
|
-
* in the node's attributes
|
|
19
|
-
*/
|
|
20
|
-
requiresAttrs: string[];
|
|
21
|
-
/**
|
|
22
|
-
* These rules can't be resolved with dynamic content
|
|
23
|
-
* in the body of the node
|
|
24
|
-
*/
|
|
25
|
-
requiresChildren: string[];
|
|
26
|
-
/**
|
|
27
|
-
* These rules can be resolved by changing content in
|
|
28
|
-
* either the node body or its attributes
|
|
29
|
-
*/
|
|
30
|
-
requiresAttrsOrChildren: string[];
|
|
31
|
-
/**
|
|
32
|
-
* These rules cannot be supported until multiple files
|
|
33
|
-
* are analyzed at once. For now they are ignored.
|
|
34
|
-
*/
|
|
35
|
-
requiresParent: string[];
|
|
36
|
-
/**
|
|
37
|
-
* These rules should not be enforced to all users of
|
|
38
|
-
* the official Marko language server.
|
|
39
|
-
*/
|
|
40
|
-
blacklist: string[];
|
|
41
|
-
/**
|
|
42
|
-
* These are rules that cannot currently be validated, either
|
|
43
|
-
* because of limitations with JSDom + axe-core or with the
|
|
44
|
-
* current implementation of the language server.
|
|
45
|
-
*/
|
|
46
|
-
cannotValidate: string[];
|
|
47
|
-
};
|
|
48
|
-
export default rules;
|