@markuplint/rules 3.0.0-alpha.6 → 3.0.0-canary.3

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.
Files changed (55) hide show
  1. package/README.md +9 -43
  2. package/lib/attr-check.d.ts +8 -19
  3. package/lib/attr-duplication/index.d.ts +1 -1
  4. package/lib/attr-value-quotes/index.d.ts +2 -2
  5. package/lib/case-sensitive-attr-name/index.d.ts +1 -1
  6. package/lib/case-sensitive-tag-name/index.d.ts +1 -1
  7. package/lib/character-reference/index.d.ts +1 -1
  8. package/lib/class-naming/index.d.ts +1 -1
  9. package/lib/create-message.d.ts +2 -12
  10. package/lib/deprecated-attr/index.d.ts +1 -1
  11. package/lib/deprecated-element/index.d.ts +1 -1
  12. package/lib/disallowed-element/index.d.ts +1 -1
  13. package/lib/doctype/index.d.ts +2 -2
  14. package/lib/end-tag/index.d.ts +1 -1
  15. package/lib/helpers.d.ts +17 -35
  16. package/lib/id-duplication/index.d.ts +1 -1
  17. package/lib/ineffective-attr/index.d.ts +1 -1
  18. package/lib/invalid-attr/index.d.ts +13 -17
  19. package/lib/label-has-control/index.d.ts +1 -1
  20. package/lib/landmark-roles/index.d.ts +3 -3
  21. package/lib/no-boolean-attr-value/index.d.ts +1 -1
  22. package/lib/no-default-value/index.d.ts +1 -1
  23. package/lib/no-empty-palpable-content/index.d.ts +3 -3
  24. package/lib/no-hard-code-id/index.d.ts +1 -1
  25. package/lib/no-refer-to-non-existent-id/index.d.ts +3 -6
  26. package/lib/no-use-event-handler-attr/index.d.ts +2 -2
  27. package/lib/permitted-contents/choice.d.ts +1 -7
  28. package/lib/permitted-contents/complex-branch.d.ts +1 -7
  29. package/lib/permitted-contents/count-pattern.d.ts +2 -17
  30. package/lib/permitted-contents/debug.d.ts +1 -1
  31. package/lib/permitted-contents/index.d.ts +1 -1
  32. package/lib/permitted-contents/matches-selector.d.ts +1 -7
  33. package/lib/permitted-contents/order.d.ts +1 -7
  34. package/lib/permitted-contents/recursive-branch.d.ts +1 -7
  35. package/lib/permitted-contents/represent-transparent-nodes.d.ts +3 -7
  36. package/lib/permitted-contents/start.d.ts +1 -6
  37. package/lib/permitted-contents/types.d.ts +27 -31
  38. package/lib/permitted-contents/utils.d.ts +21 -35
  39. package/lib/require-accessible-name/index.d.ts +2 -2
  40. package/lib/required-attr/index.d.ts +3 -3
  41. package/lib/required-element/index.d.ts +2 -2
  42. package/lib/required-h1/index.d.ts +3 -3
  43. package/lib/use-list/index.d.ts +2 -2
  44. package/lib/wai-aria/checkings/default-value.d.ts +3 -7
  45. package/lib/wai-aria/checkings/deprecated-props.d.ts +4 -8
  46. package/lib/wai-aria/checkings/disallowed-prop.d.ts +4 -8
  47. package/lib/wai-aria/checkings/implicit-props.d.ts +4 -8
  48. package/lib/wai-aria/checkings/no-global-prop.d.ts +3 -7
  49. package/lib/wai-aria/checkings/required-owned-elements.d.ts +3 -7
  50. package/lib/wai-aria/checkings/required-prop.d.ts +6 -12
  51. package/lib/wai-aria/checkings/value.d.ts +5 -9
  52. package/lib/wai-aria/index.d.ts +1 -1
  53. package/lib/wai-aria/types.d.ts +10 -10
  54. package/package.json +7 -7
  55. package/tsconfig.tsbuildinfo +1 -1
@@ -1,29 +1,14 @@
1
1
  import type { ChildNode, Element, Specs } from './types';
2
- import type {
3
- PermittedContentPattern,
4
- PermittedContentChoice,
5
- PermittedContentOneOrMore,
6
- PermittedContentOptional,
7
- PermittedContentRequire,
8
- PermittedContentTransparent,
9
- PermittedContentZeroOrMore,
10
- Model,
11
- } from '@markuplint/ml-spec';
2
+ import type { PermittedContentPattern, PermittedContentChoice, PermittedContentOneOrMore, PermittedContentOptional, PermittedContentRequire, PermittedContentTransparent, PermittedContentZeroOrMore, Model } from '@markuplint/ml-spec';
12
3
  export declare function getChildNodesWithoutWhitespaces(el: Element): ChildNode[];
13
4
  export declare function isModel(model: Model | PermittedContentPattern[]): model is Model;
14
- export declare function matches(
15
- selector: string,
16
- node: ChildNode,
17
- specs: Specs,
18
- ):
19
- | {
20
- matched: boolean;
21
- not?: undefined;
22
- }
23
- | {
24
- matched: boolean;
25
- not: ChildNode | undefined;
26
- };
5
+ export declare function matches(selector: string, node: ChildNode, specs: Specs): {
6
+ matched: boolean;
7
+ not?: undefined;
8
+ } | {
9
+ matched: boolean;
10
+ not: ChildNode | undefined;
11
+ };
27
12
  export declare function isRequire(content: PermittedContentPattern): content is PermittedContentRequire;
28
13
  export declare function isOptional(content: PermittedContentPattern): content is PermittedContentOptional;
29
14
  export declare function isOneOrMore(content: PermittedContentPattern): content is PermittedContentOneOrMore;
@@ -31,16 +16,17 @@ export declare function isZeroOrMore(content: PermittedContentPattern): content
31
16
  export declare function isChoice(content: PermittedContentPattern): content is PermittedContentChoice;
32
17
  export declare function isTransparent(content: PermittedContentPattern): content is PermittedContentTransparent;
33
18
  export declare class Collection {
34
- #private;
35
- constructor(origin: readonly ChildNode[]);
36
- get matched(): ChildNode[];
37
- get matchedCount(): number;
38
- get nodes(): ChildNode[];
39
- get unmatched(): ChildNode[];
40
- addMatched(nodes: ChildNode[]): boolean;
41
- back(): void;
42
- lock(): void;
43
- max(max: number): void;
44
- toString(highlightExtraNodes?: boolean): string;
19
+ #private;
20
+ constructor(origin: readonly ChildNode[]);
21
+ get matched(): ChildNode[];
22
+ get matchedCount(): number;
23
+ get nodes(): ChildNode[];
24
+ get unmatched(): ChildNode[];
25
+ addMatched(nodes: ChildNode[]): boolean;
26
+ back(): void;
27
+ lock(): void;
28
+ max(max: number): void;
29
+ toString(highlightExtraNodes?: boolean): string;
30
+ }
31
+ export declare class UnsupportedError extends Error {
45
32
  }
46
- export declare class UnsupportedError extends Error {}
@@ -1,6 +1,6 @@
1
1
  import type { ARIAVersion } from '@markuplint/ml-spec';
2
2
  type Option = {
3
- ariaVersion: ARIAVersion;
3
+ ariaVersion: ARIAVersion;
4
4
  };
5
- declare const _default: import('@markuplint/ml-core').RuleSeed<boolean, Option>;
5
+ declare const _default: import("@markuplint/ml-core").RuleSeed<boolean, Option>;
6
6
  export default _default;
@@ -1,7 +1,7 @@
1
1
  type RequiredAttributes = string | (string | Attr)[];
2
2
  type Attr = {
3
- name: string;
4
- value: string | string[];
3
+ name: string;
4
+ value: string | string[];
5
5
  };
6
- declare const _default: import('@markuplint/ml-core').RuleSeed<RequiredAttributes, null>;
6
+ declare const _default: import("@markuplint/ml-core").RuleSeed<RequiredAttributes, null>;
7
7
  export default _default;
@@ -1,5 +1,5 @@
1
1
  type Options = {
2
- ignoreHasMutableContents: boolean;
2
+ ignoreHasMutableContents: boolean;
3
3
  };
4
- declare const _default: import('@markuplint/ml-core').RuleSeed<string[], Options>;
4
+ declare const _default: import("@markuplint/ml-core").RuleSeed<string[], Options>;
5
5
  export default _default;
@@ -1,6 +1,6 @@
1
1
  export interface Options {
2
- 'expected-once': boolean;
3
- 'in-document-fragment': boolean;
2
+ 'expected-once': boolean;
3
+ 'in-document-fragment': boolean;
4
4
  }
5
- declare const _default: import('@markuplint/ml-core').RuleSeed<boolean, Options>;
5
+ declare const _default: import("@markuplint/ml-core").RuleSeed<boolean, Options>;
6
6
  export default _default;
@@ -1,6 +1,6 @@
1
1
  type Bullets = string[];
2
2
  type Options = {
3
- spaceNeededBullets?: string[];
3
+ spaceNeededBullets?: string[];
4
4
  };
5
- declare const _default: import('@markuplint/ml-core').RuleSeed<Bullets, Options>;
5
+ declare const _default: import("@markuplint/ml-core").RuleSeed<Bullets, Options>;
6
6
  export default _default;
@@ -1,10 +1,6 @@
1
1
  import type { Options } from '../types';
2
2
  import type { AttrChecker } from '@markuplint/ml-core';
3
3
  import type { ARIAProperty } from '@markuplint/ml-spec';
4
- export declare const checkingDefaultValue: AttrChecker<
5
- boolean,
6
- Options,
7
- {
8
- propSpecs: ARIAProperty[];
9
- }
10
- >;
4
+ export declare const checkingDefaultValue: AttrChecker<boolean, Options, {
5
+ propSpecs: ARIAProperty[];
6
+ }>;
@@ -1,11 +1,7 @@
1
1
  import type { Options } from '../types';
2
2
  import type { AttrChecker } from '@markuplint/ml-core';
3
3
  import type { ARIAProperty, ARIARole } from '@markuplint/ml-spec';
4
- export declare const checkingDeprecatedProps: AttrChecker<
5
- boolean,
6
- Options,
7
- {
8
- role: ARIARole | null;
9
- propSpecs: ARIAProperty[];
10
- }
11
- >;
4
+ export declare const checkingDeprecatedProps: AttrChecker<boolean, Options, {
5
+ role: ARIARole | null;
6
+ propSpecs: ARIAProperty[];
7
+ }>;
@@ -1,11 +1,7 @@
1
1
  import type { Options } from '../types';
2
2
  import type { AttrChecker } from '@markuplint/ml-core';
3
3
  import type { ARIAProperty, ARIARole } from '@markuplint/ml-spec';
4
- export declare const checkingDisallowedProp: AttrChecker<
5
- boolean,
6
- Options,
7
- {
8
- role: ARIARole | null;
9
- propSpecs: ARIAProperty[];
10
- }
11
- >;
4
+ export declare const checkingDisallowedProp: AttrChecker<boolean, Options, {
5
+ role: ARIARole | null;
6
+ propSpecs: ARIAProperty[];
7
+ }>;
@@ -1,11 +1,7 @@
1
1
  import type { Options } from '../types';
2
2
  import type { AttrChecker } from '@markuplint/ml-core';
3
3
  import type { ARIAProperty, Attribute } from '@markuplint/ml-spec';
4
- export declare const checkingImplicitProps: AttrChecker<
5
- boolean,
6
- Options,
7
- {
8
- propSpecs: ARIAProperty[];
9
- attrSpecs: Attribute[] | null;
10
- }
11
- >;
4
+ export declare const checkingImplicitProps: AttrChecker<boolean, Options, {
5
+ propSpecs: ARIAProperty[];
6
+ attrSpecs: Attribute[] | null;
7
+ }>;
@@ -1,10 +1,6 @@
1
1
  import type { Options } from '../types';
2
2
  import type { AttrChecker } from '@markuplint/ml-core';
3
3
  import type { ARIAProperty } from '@markuplint/ml-spec';
4
- export declare const checkingNoGlobalProp: AttrChecker<
5
- boolean,
6
- Options,
7
- {
8
- propSpecs: ARIAProperty[];
9
- }
10
- >;
4
+ export declare const checkingNoGlobalProp: AttrChecker<boolean, Options, {
5
+ propSpecs: ARIAProperty[];
6
+ }>;
@@ -6,10 +6,6 @@ import type { ARIARole } from '@markuplint/ml-spec';
6
6
  *
7
7
  * @see https://w3c.github.io/aria/#mustContain
8
8
  */
9
- export declare const checkingRequiredOwnedElements: ElementChecker<
10
- boolean,
11
- Options,
12
- {
13
- role?: ARIARole | null;
14
- }
15
- >;
9
+ export declare const checkingRequiredOwnedElements: ElementChecker<boolean, Options, {
10
+ role?: ARIARole | null;
11
+ }>;
@@ -1,15 +1,9 @@
1
1
  import type { Options } from '../types';
2
2
  import type { ElementChecker } from '@markuplint/ml-core';
3
3
  import type { ARIAProperty, ARIARole } from '@markuplint/ml-spec';
4
- export declare const checkingRequiredProp: ElementChecker<
5
- boolean,
6
- Options,
7
- {
8
- role?:
9
- | (ARIARole & {
10
- isImplicit?: boolean;
11
- })
12
- | null;
13
- propSpecs: ARIAProperty[];
14
- }
15
- >;
4
+ export declare const checkingRequiredProp: ElementChecker<boolean, Options, {
5
+ role?: (ARIARole & {
6
+ isImplicit?: boolean;
7
+ }) | null;
8
+ propSpecs: ARIAProperty[];
9
+ }>;
@@ -1,15 +1,11 @@
1
1
  import type { Options } from '../types';
2
2
  import type { AttrChecker } from '@markuplint/ml-core';
3
3
  import type { ARIAProperty, ARIARole } from '@markuplint/ml-spec';
4
- export declare const checkingValue: AttrChecker<
5
- boolean,
6
- Options,
7
- {
8
- role?: ARIARole | null;
9
- propSpecs: ARIAProperty[];
10
- booleanish?: boolean;
11
- }
12
- >;
4
+ export declare const checkingValue: AttrChecker<boolean, Options, {
5
+ role?: ARIARole | null;
6
+ propSpecs: ARIAProperty[];
7
+ booleanish?: boolean;
8
+ }>;
13
9
  /**
14
10
  *
15
11
  * @see https://www.w3.org/TR/wai-aria-1.2/#propcharacteristic_value
@@ -1,3 +1,3 @@
1
1
  import type { Options } from './types';
2
- declare const _default: import('@markuplint/ml-core').RuleSeed<boolean, Options>;
2
+ declare const _default: import("@markuplint/ml-core").RuleSeed<boolean, Options>;
3
3
  export default _default;
@@ -1,13 +1,13 @@
1
1
  import type { ARIAVersion } from '@markuplint/ml-spec';
2
2
  export type Options = {
3
- checkingValue: boolean;
4
- checkingDeprecatedProps: boolean;
5
- permittedAriaRoles: boolean;
6
- checkingRequiredOwnedElements: boolean;
7
- checkingPresentationalChildren: boolean;
8
- checkingInteractionInHidden: boolean;
9
- disallowSetImplicitRole: boolean;
10
- disallowSetImplicitProps: boolean;
11
- disallowDefaultValue: boolean;
12
- version: ARIAVersion;
3
+ checkingValue: boolean;
4
+ checkingDeprecatedProps: boolean;
5
+ permittedAriaRoles: boolean;
6
+ checkingRequiredOwnedElements: boolean;
7
+ checkingPresentationalChildren: boolean;
8
+ checkingInteractionInHidden: boolean;
9
+ disallowSetImplicitRole: boolean;
10
+ disallowSetImplicitProps: boolean;
11
+ disallowDefaultValue: boolean;
12
+ version: ARIAVersion;
13
13
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@markuplint/rules",
3
- "version": "3.0.0-alpha.6",
4
- "description": "Rules for markuplint",
3
+ "version": "3.0.0-canary.3+382d1365",
4
+ "description": "Built-in rules of markuplint",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
7
7
  "license": "MIT",
@@ -17,10 +17,10 @@
17
17
  "clean": "tsc --build --clean"
18
18
  },
19
19
  "dependencies": {
20
- "@markuplint/html-spec": "3.0.0-alpha.6",
21
- "@markuplint/ml-core": "3.0.0-alpha.6",
22
- "@markuplint/ml-spec": "3.0.0-alpha.6",
23
- "@markuplint/types": "3.0.0-alpha.6",
20
+ "@markuplint/html-spec": "3.0.0-canary.5+382d1365",
21
+ "@markuplint/ml-core": "3.0.0-canary.5+382d1365",
22
+ "@markuplint/ml-spec": "3.0.0-canary.5+382d1365",
23
+ "@markuplint/types": "3.0.0-canary.5+382d1365",
24
24
  "@ungap/structured-clone": "^1.0.1",
25
25
  "debug": "^4.3.4",
26
26
  "html-entities": "^2.3.3",
@@ -29,5 +29,5 @@
29
29
  "devDependencies": {
30
30
  "@types/debug": "^4.1.7"
31
31
  },
32
- "gitHead": "b185a06d4ea09a1bf32458f7be4abe510eb57b89"
32
+ "gitHead": "382d13653071bd02210d5430403d1a87c840398c"
33
33
  }