@marko/language-server 1.1.8 → 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.
@@ -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 {};
@@ -1,4 +1,5 @@
1
1
  import type ts from "typescript/lib/tsserverlibrary";
2
+ import "../utils/project-defaults";
2
3
  export interface InitOptions {
3
4
  typescript: typeof ts;
4
5
  }
@@ -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.8",
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.6",
12
- "@marko/babel-utils": "^6.3.1",
13
- "@marko/compiler": "^5.33.2",
14
- "@marko/translator-default": "^5.31.3",
15
- "htmljs-parser": "^5.5.0",
16
- "marko": "^5.31.10",
17
- "prettier": "^2.8.8",
18
- "prettier-plugin-marko": "^2.1.0",
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.2.2",
22
- "vscode-css-languageservice": "^6.2.9",
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.7"
25
+ "vscode-uri": "^3.0.8"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/prettier": "^2.7.3",
29
- "tsx": "^3.13.0"
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;