@askviraj/linter 1.1.2 → 1.1.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.
- package/node_modules/{synckit → @astrojs/compiler-binding}/LICENSE +1 -1
- package/node_modules/@astrojs/compiler-binding/browser.js +1 -0
- package/node_modules/@astrojs/compiler-binding/index.d.ts +337 -0
- package/node_modules/@astrojs/compiler-binding/index.js +599 -0
- package/node_modules/@astrojs/compiler-binding/package.json +83 -0
- package/node_modules/@astrojs/compiler-binding/webcontainer-fallback.cjs +23 -0
- package/node_modules/@astrojs/compiler-binding-linux-x64-gnu/README.md +3 -0
- package/node_modules/@astrojs/compiler-binding-linux-x64-gnu/astro.linux-x64-gnu.node +0 -0
- package/node_modules/@astrojs/compiler-binding-linux-x64-gnu/package.json +40 -0
- package/node_modules/{parse5 → @astrojs/compiler-rs}/LICENSE +7 -5
- package/node_modules/@astrojs/compiler-rs/README.md +62 -0
- package/node_modules/@astrojs/compiler-rs/async.d.ts +1 -0
- package/node_modules/@astrojs/compiler-rs/dist/async.d.mts +9 -0
- package/node_modules/@astrojs/compiler-rs/dist/async.mjs +1 -0
- package/node_modules/@astrojs/compiler-rs/dist/index.d.mts +9 -0
- package/node_modules/@astrojs/compiler-rs/dist/index.mjs +1 -0
- package/node_modules/@astrojs/compiler-rs/dist/shared.d.mts +45 -0
- package/node_modules/@astrojs/compiler-rs/dist/shared.mjs +1 -0
- package/node_modules/@astrojs/compiler-rs/dist/types.d.mts +94 -0
- package/node_modules/@astrojs/compiler-rs/dist/types.mjs +1 -0
- package/node_modules/@astrojs/compiler-rs/dist/utils.d.mts +4 -0
- package/node_modules/@astrojs/compiler-rs/dist/utils.mjs +1 -0
- package/node_modules/@astrojs/compiler-rs/package.json +55 -0
- package/node_modules/@astrojs/compiler-rs/types.d.ts +1 -0
- package/node_modules/@eslint/config-helpers/README.md +2 -2
- package/node_modules/@eslint/config-helpers/dist/cjs/index.cjs +27 -26
- package/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts +13 -12
- package/node_modules/@eslint/config-helpers/dist/cjs/types.cts +4 -2
- package/node_modules/@eslint/config-helpers/dist/esm/index.d.ts +13 -12
- package/node_modules/@eslint/config-helpers/dist/esm/index.js +27 -26
- package/node_modules/@eslint/config-helpers/dist/esm/types.d.ts +2 -0
- package/node_modules/@eslint/config-helpers/dist/esm/types.ts +4 -2
- package/node_modules/@eslint/config-helpers/package.json +1 -1
- package/node_modules/@eslint/css/README.md +2 -2
- package/node_modules/@eslint/css/dist/build/rules.d.ts +75 -21
- package/node_modules/@eslint/css/dist/build/rules.js +15 -15
- package/node_modules/@eslint/css/dist/data/baseline-data.js +256 -32
- package/node_modules/@eslint/css/dist/index.js +1 -1
- package/node_modules/@eslint/css/dist/rules/font-family-fallbacks.d.ts +15 -15
- package/node_modules/@eslint/css/dist/rules/font-family-fallbacks.js +2 -5
- package/node_modules/@eslint/css/dist/rules/no-duplicate-imports.d.ts +18 -18
- package/node_modules/@eslint/css/dist/rules/no-duplicate-imports.js +9 -12
- package/node_modules/@eslint/css/dist/rules/no-duplicate-keyframe-selectors.d.ts +14 -14
- package/node_modules/@eslint/css/dist/rules/no-duplicate-keyframe-selectors.js +2 -3
- package/node_modules/@eslint/css/dist/rules/no-empty-blocks.d.ts +14 -14
- package/node_modules/@eslint/css/dist/rules/no-empty-blocks.js +2 -3
- package/node_modules/@eslint/css/dist/rules/no-important.d.ts +16 -16
- package/node_modules/@eslint/css/dist/rules/no-important.js +2 -3
- package/node_modules/@eslint/css/dist/rules/no-invalid-at-rule-placement.d.ts +16 -16
- package/node_modules/@eslint/css/dist/rules/no-invalid-at-rule-placement.js +2 -3
- package/node_modules/@eslint/css/dist/rules/no-invalid-at-rules.d.ts +21 -21
- package/node_modules/@eslint/css/dist/rules/no-invalid-at-rules.js +2 -3
- package/node_modules/@eslint/css/dist/rules/no-invalid-named-grid-areas.d.ts +16 -16
- package/node_modules/@eslint/css/dist/rules/no-invalid-named-grid-areas.js +2 -3
- package/node_modules/@eslint/css/dist/rules/no-invalid-properties.d.ts +18 -18
- package/node_modules/@eslint/css/dist/rules/no-invalid-properties.js +2 -3
- package/node_modules/@eslint/css/dist/rules/no-unmatchable-selectors.d.ts +14 -14
- package/node_modules/@eslint/css/dist/rules/no-unmatchable-selectors.js +2 -3
- package/node_modules/@eslint/css/dist/rules/prefer-logical-properties.d.ts +22 -19
- package/node_modules/@eslint/css/dist/rules/prefer-logical-properties.js +66 -23
- package/node_modules/@eslint/css/dist/rules/relative-font-units.d.ts +16 -16
- package/node_modules/@eslint/css/dist/rules/relative-font-units.js +13 -7
- package/node_modules/@eslint/css/dist/rules/selector-complexity.d.ts +17 -17
- package/node_modules/@eslint/css/dist/rules/selector-complexity.js +2 -3
- package/node_modules/@eslint/css/dist/rules/use-baseline.d.ts +22 -22
- package/node_modules/@eslint/css/dist/rules/use-baseline.js +2 -3
- package/node_modules/@eslint/css/dist/rules/use-layers.d.ts +18 -18
- package/node_modules/@eslint/css/dist/rules/use-layers.js +3 -4
- package/node_modules/@eslint/css/package.json +7 -12
- package/node_modules/@eslint/css-tree/README.md +2 -2
- package/node_modules/@eslint/css-tree/dist/csstree.esm.js +1 -1
- package/node_modules/@eslint/css-tree/dist/csstree.js +1 -1
- package/node_modules/@eslint/css-tree/dist/data.cjs +4 -1
- package/node_modules/@eslint/css-tree/dist/data.js +4 -1
- package/node_modules/@eslint/css-tree/dist/version.cjs +1 -1
- package/node_modules/@eslint/css-tree/dist/version.js +1 -1
- package/node_modules/@eslint/css-tree/package.json +3 -3
- package/node_modules/@eslint/json/README.md +2 -2
- package/node_modules/@eslint/json/dist/index.js +1 -1
- package/node_modules/@eslint/json/package.json +4 -9
- package/node_modules/@eslint/markdown/README.md +3 -3
- package/node_modules/@eslint/markdown/dist/build/rules.d.ts +105 -27
- package/node_modules/@eslint/markdown/dist/build/rules.js +21 -21
- package/node_modules/@eslint/markdown/dist/index.d.ts +2 -2
- package/node_modules/@eslint/markdown/dist/index.js +4 -4
- package/node_modules/@eslint/markdown/dist/processor.d.ts +4 -9
- package/node_modules/@eslint/markdown/dist/processor.js +12 -15
- package/node_modules/@eslint/markdown/dist/rules/fenced-code-language.d.ts +17 -17
- package/node_modules/@eslint/markdown/dist/rules/fenced-code-language.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/fenced-code-meta.d.ts +17 -17
- package/node_modules/@eslint/markdown/dist/rules/fenced-code-meta.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/heading-increment.d.ts +16 -16
- package/node_modules/@eslint/markdown/dist/rules/heading-increment.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-bare-urls.d.ts +14 -14
- package/node_modules/@eslint/markdown/dist/rules/no-bare-urls.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-duplicate-definitions.d.ts +17 -17
- package/node_modules/@eslint/markdown/dist/rules/no-duplicate-definitions.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-duplicate-headings.d.ts +15 -15
- package/node_modules/@eslint/markdown/dist/rules/no-duplicate-headings.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-empty-definitions.d.ts +17 -17
- package/node_modules/@eslint/markdown/dist/rules/no-empty-definitions.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-empty-images.d.ts +14 -14
- package/node_modules/@eslint/markdown/dist/rules/no-empty-images.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-empty-links.d.ts +14 -14
- package/node_modules/@eslint/markdown/dist/rules/no-empty-links.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-html.d.ts +15 -15
- package/node_modules/@eslint/markdown/dist/rules/no-html.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-invalid-label-refs.d.ts +14 -14
- package/node_modules/@eslint/markdown/dist/rules/no-invalid-label-refs.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-missing-atx-heading-space.d.ts +17 -17
- package/node_modules/@eslint/markdown/dist/rules/no-missing-atx-heading-space.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-missing-label-refs.d.ts +16 -16
- package/node_modules/@eslint/markdown/dist/rules/no-missing-label-refs.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-missing-link-fragments.d.ts +16 -16
- package/node_modules/@eslint/markdown/dist/rules/no-missing-link-fragments.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-multiple-h1.d.ts +16 -16
- package/node_modules/@eslint/markdown/dist/rules/no-multiple-h1.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-reference-like-urls.d.ts +15 -15
- package/node_modules/@eslint/markdown/dist/rules/no-reference-like-urls.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-reversed-media-syntax.d.ts +15 -15
- package/node_modules/@eslint/markdown/dist/rules/no-reversed-media-syntax.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-space-in-emphasis.d.ts +17 -17
- package/node_modules/@eslint/markdown/dist/rules/no-space-in-emphasis.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/no-unused-definitions.d.ts +17 -17
- package/node_modules/@eslint/markdown/dist/rules/no-unused-definitions.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/require-alt-text.d.ts +14 -14
- package/node_modules/@eslint/markdown/dist/rules/require-alt-text.js +2 -3
- package/node_modules/@eslint/markdown/dist/rules/table-column-count.d.ts +17 -17
- package/node_modules/@eslint/markdown/dist/rules/table-column-count.js +2 -3
- package/node_modules/@eslint/markdown/package.json +5 -10
- package/node_modules/@eslint-community/eslint-utils/index.js +1 -1
- package/node_modules/@eslint-community/eslint-utils/index.js.map +1 -1
- package/node_modules/@eslint-community/eslint-utils/index.mjs +1 -1
- package/node_modules/@eslint-community/eslint-utils/index.mjs.map +1 -1
- package/node_modules/@eslint-community/eslint-utils/package.json +12 -7
- package/node_modules/@html-eslint/core/dist/index.js +1 -0
- package/node_modules/@html-eslint/core/dist/index.js.map +1 -1
- package/node_modules/@html-eslint/core/dist/index.mjs +1 -0
- package/node_modules/@html-eslint/core/dist/index.mjs.map +1 -1
- package/node_modules/@html-eslint/core/package.json +3 -3
- package/node_modules/@html-eslint/eslint-plugin/lib/rules/require-content.js +20 -1
- package/node_modules/@html-eslint/eslint-plugin/lib/rules/require-input-label.js +110 -8
- package/node_modules/@html-eslint/eslint-plugin/lib/rules/utils/node.js +13 -0
- package/node_modules/@html-eslint/eslint-plugin/package.json +7 -7
- package/node_modules/@html-eslint/eslint-plugin/types/rules/require-content.d.ts.map +1 -1
- package/node_modules/@html-eslint/eslint-plugin/types/rules/require-input-label.d.ts.map +1 -1
- package/node_modules/@html-eslint/eslint-plugin/types/rules/utils/node.d.ts +7 -0
- package/node_modules/@html-eslint/eslint-plugin/types/rules/utils/node.d.ts.map +1 -1
- package/node_modules/@html-eslint/parser/lib/parser.js +0 -1
- package/node_modules/@html-eslint/parser/package.json +4 -4
- package/node_modules/@html-eslint/parser/types/parser.d.ts.map +1 -1
- package/node_modules/@html-eslint/template-parser/package.json +3 -3
- package/node_modules/@html-eslint/template-syntax-parser/package.json +3 -3
- package/node_modules/@html-eslint/types/package.json +2 -2
- package/node_modules/@rviscomi/capo.js/README.md +4 -4
- package/node_modules/@rviscomi/capo.js/dist/adapters/adapter.cjs +7 -2
- package/node_modules/@rviscomi/capo.js/dist/adapters/browser.cjs +31 -3
- package/node_modules/@rviscomi/capo.js/dist/adapters/index.cjs +36 -4
- package/node_modules/@rviscomi/capo.js/dist/adapters/test-suite.cjs +6 -1
- package/node_modules/@rviscomi/capo.js/dist/analyzer.cjs +53 -24
- package/node_modules/@rviscomi/capo.js/dist/chrome/README.md +53 -0
- package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/capo.html +1 -1
- package/node_modules/@rviscomi/capo.js/dist/chrome/capo.js +3 -0
- package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/chrome.js +56 -18
- package/node_modules/@rviscomi/capo.js/dist/chrome/manifest.json +26 -0
- package/node_modules/@rviscomi/capo.js/dist/chrome/options/options.js +1 -0
- package/node_modules/@rviscomi/capo.js/dist/chrome.zip +0 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox/README.md +53 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox/background.js +7 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox/capo.css +59 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox/capo.html +12 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox/capo.js +3 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox/chrome.js +120 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox/images/icon128.png +0 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox/manifest.json +39 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox/options/options.css +81 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox/options/options.html +43 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox/options/options.js +1 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox/styles/open-props.css +291 -0
- package/node_modules/@rviscomi/capo.js/dist/firefox.zip +0 -0
- package/node_modules/@rviscomi/capo.js/dist/index.cjs +93 -33
- package/node_modules/@rviscomi/capo.js/dist/lib/colors.cjs +1 -0
- package/node_modules/@rviscomi/capo.js/dist/lib/io.cjs +137 -28
- package/node_modules/@rviscomi/capo.js/dist/lib/options.cjs +61 -0
- package/node_modules/@rviscomi/capo.js/dist/lib/rules.cjs +28 -13
- package/node_modules/@rviscomi/capo.js/dist/lib/validation.cjs +31 -16
- package/node_modules/@rviscomi/capo.js/dist/source.zip +0 -0
- package/node_modules/@rviscomi/capo.js/dist/types/adapters/adapter.d.ts +105 -0
- package/node_modules/@rviscomi/capo.js/dist/types/adapters/browser.d.ts +107 -0
- package/node_modules/@rviscomi/capo.js/dist/types/adapters/index.d.ts +7 -0
- package/node_modules/@rviscomi/capo.js/dist/types/adapters/test-suite.d.ts +52 -0
- package/node_modules/@rviscomi/capo.js/dist/types/analyzer.d.ts +195 -0
- package/node_modules/@rviscomi/capo.js/dist/types/index.d.ts +29 -0
- package/node_modules/@rviscomi/capo.js/dist/types/lib/colors.d.ts +20 -0
- package/node_modules/@rviscomi/capo.js/dist/types/lib/io.d.ts +166 -0
- package/node_modules/@rviscomi/capo.js/dist/types/lib/options.d.ts +114 -0
- package/node_modules/@rviscomi/capo.js/dist/types/lib/rules.d.ts +111 -0
- package/node_modules/@rviscomi/capo.js/dist/types/lib/validation.d.ts +61 -0
- package/node_modules/@rviscomi/capo.js/dist/types/src/adapters/adapter.d.ts +105 -0
- package/node_modules/@rviscomi/capo.js/dist/types/src/adapters/browser.d.ts +107 -0
- package/node_modules/@rviscomi/capo.js/dist/types/src/adapters/index.d.ts +7 -0
- package/node_modules/@rviscomi/capo.js/dist/types/src/adapters/test-suite.d.ts +52 -0
- package/node_modules/@rviscomi/capo.js/dist/types/src/analyzer.d.ts +195 -0
- package/node_modules/@rviscomi/capo.js/dist/types/src/index.d.ts +13 -0
- package/node_modules/@rviscomi/capo.js/dist/types/src/lib/colors.d.ts +20 -0
- package/node_modules/@rviscomi/capo.js/dist/types/src/lib/io.d.ts +166 -0
- package/node_modules/@rviscomi/capo.js/dist/types/src/lib/options.d.ts +114 -0
- package/node_modules/@rviscomi/capo.js/dist/types/src/lib/rules.d.ts +111 -0
- package/node_modules/@rviscomi/capo.js/dist/types/src/lib/validation.d.ts +61 -0
- package/node_modules/@rviscomi/capo.js/package.json +34 -16
- package/node_modules/@rviscomi/capo.js/src/adapters/adapter.js +16 -5
- package/node_modules/@rviscomi/capo.js/src/adapters/browser.js +30 -4
- package/node_modules/@rviscomi/capo.js/src/adapters/test-suite.js +11 -10
- package/node_modules/@rviscomi/capo.js/src/analyzer.js +47 -25
- package/node_modules/@rviscomi/capo.js/src/extension/README.md +53 -0
- package/node_modules/@rviscomi/capo.js/src/extension/background.js +7 -0
- package/node_modules/@rviscomi/capo.js/src/extension/capo.css +59 -0
- package/node_modules/@rviscomi/capo.js/src/extension/capo.html +12 -0
- package/node_modules/@rviscomi/capo.js/src/extension/capo.js +93 -0
- package/node_modules/@rviscomi/capo.js/src/extension/chrome.js +120 -0
- package/node_modules/@rviscomi/capo.js/src/extension/images/icon128.png +0 -0
- package/node_modules/@rviscomi/capo.js/src/extension/images/icon256.png +0 -0
- package/node_modules/@rviscomi/capo.js/{crx → src/extension}/manifest.json +1 -1
- package/node_modules/@rviscomi/capo.js/src/extension/options/options.css +81 -0
- package/node_modules/@rviscomi/capo.js/src/extension/options/options.html +43 -0
- package/node_modules/@rviscomi/capo.js/src/extension/options.js +87 -0
- package/node_modules/@rviscomi/capo.js/src/extension/styles/open-props.css +291 -0
- package/node_modules/@rviscomi/capo.js/src/index.js +10 -0
- package/node_modules/@rviscomi/capo.js/src/lib/colors.js +14 -0
- package/node_modules/@rviscomi/capo.js/src/lib/io.js +171 -32
- package/node_modules/@rviscomi/capo.js/src/lib/options.js +82 -1
- package/node_modules/@rviscomi/capo.js/src/lib/rules.js +120 -43
- package/node_modules/@rviscomi/capo.js/src/lib/validation.js +211 -86
- package/node_modules/@rviscomi/capo.js/src/web/capo.js +5 -8
- package/node_modules/@types/hast/README.md +2 -2
- package/node_modules/@types/hast/index.d.ts +642 -0
- package/node_modules/@types/hast/package.json +9 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.d.ts +0 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.js +0 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.js +0 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/index.d.ts +0 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +47 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.d.ts +0 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +4 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.d.ts +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js +23 -10
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js +16 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js +41 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js +12 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.d.ts +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +5 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js +5 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +36 -9
- package/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/index.js +11 -2
- package/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/legacy.js +11 -2
- package/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/package.json +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/package.json +22 -11
- package/node_modules/@typescript-eslint/parser/dist/index.js +47 -0
- package/node_modules/@typescript-eslint/parser/dist/parser.js +11 -6
- package/node_modules/@typescript-eslint/parser/package.json +9 -7
- package/node_modules/@typescript-eslint/project-service/package.json +7 -5
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js +2 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/package.json +8 -6
- package/node_modules/@typescript-eslint/tsconfig-utils/package.json +5 -3
- package/node_modules/@typescript-eslint/type-utils/package.json +9 -7
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +10 -0
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +13 -0
- package/node_modules/@typescript-eslint/types/package.json +5 -3
- package/node_modules/@typescript-eslint/typescript-estree/dist/check-syntax-errors.js +22 -6
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +5 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/getImportClausePhaseModifier.d.ts +4 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/getImportClausePhaseModifier.js +56 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +27 -18
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts +8 -0
- package/node_modules/@typescript-eslint/typescript-estree/package.json +9 -7
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/package.json +8 -6
- package/node_modules/@typescript-eslint/visitor-keys/package.json +6 -4
- package/node_modules/acorn/CHANGELOG.md +12 -0
- package/node_modules/acorn/README.md +5 -0
- package/node_modules/acorn/dist/acorn.d.mts +8 -0
- package/node_modules/acorn/dist/acorn.d.ts +8 -0
- package/node_modules/acorn/dist/acorn.js +16 -7
- package/node_modules/acorn/dist/acorn.mjs +16 -7
- package/node_modules/acorn/package.json +1 -1
- package/node_modules/astro-eslint-parser/lib/index.d.mts +113 -18
- package/node_modules/astro-eslint-parser/lib/index.mjs +871 -1172
- package/node_modules/astro-eslint-parser/package.json +7 -9
- package/node_modules/brace-expansion/README.md +11 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts +2 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/brace-expansion/dist/commonjs/index.js +162 -84
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.d.ts +2 -0
- package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js +161 -83
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
- package/node_modules/brace-expansion/package.json +2 -2
- package/node_modules/eslint/README.md +2 -2
- package/node_modules/eslint/lib/cli-engine/formatters/html.js +1 -1
- package/node_modules/eslint/lib/languages/js/index.js +1 -1
- package/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js +1 -1
- package/node_modules/eslint/lib/linter/vfile.js +1 -1
- package/node_modules/eslint/lib/rules/class-methods-use-this.js +6 -5
- package/node_modules/eslint/lib/rules/complexity.js +1 -1
- package/node_modules/eslint/lib/rules/eqeqeq.js +26 -6
- package/node_modules/eslint/lib/rules/func-name-matching.js +3 -3
- package/node_modules/eslint/lib/rules/generator-star-spacing.js +4 -6
- package/node_modules/eslint/lib/rules/indent.js +4 -6
- package/node_modules/eslint/lib/rules/key-spacing.js +5 -7
- package/node_modules/eslint/lib/rules/max-len.js +1 -1
- package/node_modules/eslint/lib/rules/max-nested-callbacks.js +11 -1
- package/node_modules/eslint/lib/rules/no-compare-neg-zero.js +91 -8
- package/node_modules/eslint/lib/rules/no-control-regex.js +3 -0
- package/node_modules/eslint/lib/rules/no-implicit-coercion.js +22 -8
- package/node_modules/eslint/lib/rules/no-invalid-regexp.js +3 -1
- package/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +5 -7
- package/node_modules/eslint/lib/rules/no-promise-executor-return.js +5 -7
- package/node_modules/eslint/lib/rules/no-script-url.js +4 -6
- package/node_modules/eslint/lib/rules/no-shadow.js +14 -20
- package/node_modules/eslint/lib/rules/no-unreachable-loop.js +8 -4
- package/node_modules/eslint/lib/rules/prefer-numeric-literals.js +14 -6
- package/node_modules/eslint/lib/rules/prefer-object-has-own.js +4 -6
- package/node_modules/eslint/lib/rules/prefer-object-spread.js +9 -1
- package/node_modules/eslint/lib/rules/prefer-template.js +1 -1
- package/node_modules/eslint/lib/rules/preserve-caught-error.js +268 -116
- package/node_modules/eslint/lib/rules/quotes.js +1 -1
- package/node_modules/eslint/lib/rules/radix.js +58 -57
- package/node_modules/eslint/lib/rules/use-isnan.js +20 -12
- package/node_modules/eslint/lib/rules/utils/ast-utils.js +1 -1
- package/node_modules/eslint/lib/shared/serialization.js +1 -1
- package/node_modules/eslint/lib/shared/translate-cli-options.js +3 -3
- package/node_modules/eslint/lib/types/config-api.d.ts +8 -1
- package/node_modules/eslint/lib/types/index.d.ts +3 -6
- package/node_modules/eslint/lib/types/rules.d.ts +17 -9
- package/node_modules/eslint/package.json +7 -7
- package/node_modules/eslint-plugin-astro/README.md +10 -2
- package/node_modules/eslint-plugin-astro/lib/index.d.mts +0 -1
- package/node_modules/eslint-plugin-astro/lib/index.mjs +76 -637
- package/node_modules/eslint-plugin-astro/package.json +11 -11
- package/node_modules/eslint-plugin-toml/README.md +2 -0
- package/node_modules/eslint-plugin-toml/lib/index.d.mts +6 -5
- package/node_modules/eslint-plugin-toml/lib/index.mjs +32 -3
- package/node_modules/eslint-plugin-toml/package.json +7 -7
- package/node_modules/eslint-plugin-yml/lib/index.mjs +49 -19
- package/node_modules/eslint-plugin-yml/package.json +2 -2
- package/node_modules/flatted/golang/pkg/flatted/flatted.go +16 -14
- package/node_modules/flatted/package.json +10 -5
- package/node_modules/flatted/types/index.d.ts +1 -1
- package/node_modules/globals/globals.json +105 -33
- package/node_modules/globals/index.d.ts +105 -33
- package/node_modules/globals/package.json +2 -2
- package/node_modules/mdn-data/css/properties.json +64 -16
- package/node_modules/mdn-data/css/properties.schema.json +1 -7
- package/node_modules/mdn-data/css/syntaxes.json +1 -1
- package/node_modules/mdn-data/l10n/css.json +3 -62
- package/node_modules/mdn-data/package.json +1 -1
- package/node_modules/minimatch/package.json +9 -9
- package/node_modules/nanoid/non-secure/index.cjs +2 -2
- package/node_modules/nanoid/non-secure/index.js +2 -2
- package/node_modules/nanoid/package.json +1 -1
- package/node_modules/picomatch/README.md +15 -21
- package/node_modules/picomatch/lib/parse.js +39 -9
- package/node_modules/picomatch/lib/picomatch.js +14 -2
- package/node_modules/picomatch/package.json +3 -2
- package/node_modules/postcss/README.md +1 -2
- package/node_modules/postcss/lib/container.js +81 -34
- package/node_modules/postcss/lib/fromJSON.js +65 -26
- package/node_modules/postcss/lib/input.js +7 -1
- package/node_modules/postcss/lib/lazy-result.js +77 -14
- package/node_modules/postcss/lib/list.js +1 -0
- package/node_modules/postcss/lib/node.d.ts +2 -2
- package/node_modules/postcss/lib/node.js +90 -52
- package/node_modules/postcss/lib/postcss.d.ts +4 -1
- package/node_modules/postcss/lib/previous-map.js +6 -3
- package/node_modules/postcss/lib/processor.js +1 -1
- package/node_modules/postcss/lib/root.js +16 -1
- package/node_modules/postcss/lib/stringifier.js +112 -25
- package/node_modules/postcss/lib/warning.js +10 -0
- package/node_modules/postcss/package.json +2 -2
- package/node_modules/typescript-eslint/dist/index.js +47 -0
- package/node_modules/typescript-eslint/package.json +14 -6
- package/node_modules/yaml-eslint-parser/lib/chunk-CfYAbeIz.mjs +13 -0
- package/node_modules/yaml-eslint-parser/lib/index.d.mts +2 -2
- package/node_modules/yaml-eslint-parser/lib/index.mjs +164 -157
- package/node_modules/yaml-eslint-parser/package.json +17 -18
- package/package.json +23 -23
- package/node_modules/@astrojs/compiler/LICENSE +0 -53
- package/node_modules/@astrojs/compiler/README.md +0 -72
- package/node_modules/@astrojs/compiler/dist/astro.wasm +0 -0
- package/node_modules/@astrojs/compiler/dist/browser/index.cjs +0 -2
- package/node_modules/@astrojs/compiler/dist/browser/index.d.ts +0 -11
- package/node_modules/@astrojs/compiler/dist/browser/index.js +0 -1
- package/node_modules/@astrojs/compiler/dist/browser/utils.cjs +0 -3
- package/node_modules/@astrojs/compiler/dist/browser/utils.d.ts +0 -29
- package/node_modules/@astrojs/compiler/dist/browser/utils.js +0 -3
- package/node_modules/@astrojs/compiler/dist/browser/wasm_exec.cjs +0 -2
- package/node_modules/@astrojs/compiler/dist/browser/wasm_exec.d.ts +0 -37
- package/node_modules/@astrojs/compiler/dist/browser/wasm_exec.js +0 -1
- package/node_modules/@astrojs/compiler/dist/chunk-QR6QDSEV.js +0 -2
- package/node_modules/@astrojs/compiler/dist/chunk-W5DTLHV4.js +0 -1
- package/node_modules/@astrojs/compiler/dist/node/index.cjs +0 -1
- package/node_modules/@astrojs/compiler/dist/node/index.d.ts +0 -12
- package/node_modules/@astrojs/compiler/dist/node/index.js +0 -1
- package/node_modules/@astrojs/compiler/dist/node/sync.cjs +0 -1
- package/node_modules/@astrojs/compiler/dist/node/sync.d.ts +0 -16
- package/node_modules/@astrojs/compiler/dist/node/sync.js +0 -1
- package/node_modules/@astrojs/compiler/dist/node/utils.cjs +0 -3
- package/node_modules/@astrojs/compiler/dist/node/utils.d.ts +0 -29
- package/node_modules/@astrojs/compiler/dist/node/utils.js +0 -3
- package/node_modules/@astrojs/compiler/dist/node/wasm_exec.cjs +0 -1
- package/node_modules/@astrojs/compiler/dist/node/wasm_exec.d.ts +0 -37
- package/node_modules/@astrojs/compiler/dist/node/wasm_exec.js +0 -1
- package/node_modules/@astrojs/compiler/dist/shared/ast.cjs +0 -1
- package/node_modules/@astrojs/compiler/dist/shared/ast.d.ts +0 -74
- package/node_modules/@astrojs/compiler/dist/shared/ast.js +0 -0
- package/node_modules/@astrojs/compiler/dist/shared/diagnostics.cjs +0 -1
- package/node_modules/@astrojs/compiler/dist/shared/diagnostics.d.ts +0 -18
- package/node_modules/@astrojs/compiler/dist/shared/diagnostics.js +0 -1
- package/node_modules/@astrojs/compiler/dist/shared/types.cjs +0 -1
- package/node_modules/@astrojs/compiler/dist/shared/types.d.ts +0 -153
- package/node_modules/@astrojs/compiler/dist/shared/types.js +0 -1
- package/node_modules/@astrojs/compiler/package.json +0 -58
- package/node_modules/@astrojs/compiler/sync.d.ts +0 -1
- package/node_modules/@astrojs/compiler/types.d.ts +0 -1
- package/node_modules/@astrojs/compiler/utils.d.ts +0 -1
- package/node_modules/@pkgr/core/index.d.cts +0 -3
- package/node_modules/@pkgr/core/lib/constants.d.ts +0 -6
- package/node_modules/@pkgr/core/lib/constants.js +0 -9
- package/node_modules/@pkgr/core/lib/constants.js.map +0 -1
- package/node_modules/@pkgr/core/lib/helpers.d.ts +0 -19
- package/node_modules/@pkgr/core/lib/helpers.js +0 -67
- package/node_modules/@pkgr/core/lib/helpers.js.map +0 -1
- package/node_modules/@pkgr/core/lib/index.cjs +0 -91
- package/node_modules/@pkgr/core/lib/index.d.ts +0 -2
- package/node_modules/@pkgr/core/lib/index.js +0 -3
- package/node_modules/@pkgr/core/lib/index.js.map +0 -1
- package/node_modules/@pkgr/core/package.json +0 -38
- package/node_modules/@rviscomi/capo.js/crx/README.md +0 -10
- package/node_modules/@rviscomi/capo.js/crx/capo.js +0 -3
- package/node_modules/@rviscomi/capo.js/crx/options/options.js +0 -1
- package/node_modules/@rviscomi/capo.js/docs/.vscode/extensions.json +0 -4
- package/node_modules/@rviscomi/capo.js/docs/.vscode/launch.json +0 -11
- package/node_modules/@rviscomi/capo.js/docs/README.md +0 -51
- package/node_modules/@rviscomi/capo.js/docs/astro.config.mjs +0 -82
- package/node_modules/@rviscomi/capo.js/docs/package-lock.json +0 -7439
- package/node_modules/@rviscomi/capo.js/docs/package.json +0 -21
- package/node_modules/@rviscomi/capo.js/docs/public/capo-social-alt.webp +0 -0
- package/node_modules/@rviscomi/capo.js/docs/public/capo-social.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/public/capo-social.webp +0 -0
- package/node_modules/@rviscomi/capo.js/docs/public/favicon.svg +0 -13
- package/node_modules/@rviscomi/capo.js/docs/src/assets/bookmarklet-setup.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/bookmarklet.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/capo-chrome.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/capo-extension.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/capo800.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-console-expanded.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-console-interactive.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-console.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-hover-validation.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-menu.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-options-dark.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-options-light.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-store.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/custom-palette.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/developer-mode.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/devtools-console.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/devtools-snippet.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/devtools-sources.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/houston.webp +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/load-unpacked.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-areas.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-base.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-crx-stripes.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-csp.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-invalid-element.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-origin-trial.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-title.png +0 -0
- package/node_modules/@rviscomi/capo.js/docs/src/components/CapoClient.astro +0 -165
- package/node_modules/@rviscomi/capo.js/docs/src/components/CapoOptions.astro +0 -10
- package/node_modules/@rviscomi/capo.js/docs/src/components/CapoPalette.astro +0 -26
- package/node_modules/@rviscomi/capo.js/docs/src/components/InlineCapoIcon.astro +0 -15
- package/node_modules/@rviscomi/capo.js/docs/src/components/InlineCapoWeightBars.astro +0 -39
- package/node_modules/@rviscomi/capo.js/docs/src/components/VirtualConsole.astro +0 -11
- package/node_modules/@rviscomi/capo.js/docs/src/content/config.ts +0 -7
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/developer/contributing.mdx +0 -8
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/developer/crx-local.mdx +0 -28
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/developer/custom-adapters.mdx +0 -273
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/index.mdx +0 -108
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/migration-v2.mdx +0 -62
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/actionability.mdx +0 -6
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/assessment-mode.mdx +0 -29
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/config.mdx +0 -195
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/demo.mdx +0 -9
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/extension.mdx +0 -116
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/performance.mdx +0 -6
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/quick-start.mdx +0 -26
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/rules.mdx +0 -202
- package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/validation.mdx +0 -197
- package/node_modules/@rviscomi/capo.js/docs/src/env.d.ts +0 -2
- package/node_modules/@rviscomi/capo.js/docs/src/lib/VirtualConsole.js +0 -190
- package/node_modules/@rviscomi/capo.js/docs/src/lib/capo.js +0 -1533
- package/node_modules/@rviscomi/capo.js/docs/src/styles/custom.css +0 -7
- package/node_modules/@rviscomi/capo.js/docs/src/styles/virtual-console.css +0 -131
- package/node_modules/@rviscomi/capo.js/docs/tests/VirtualConsole.test.js +0 -108
- package/node_modules/@rviscomi/capo.js/docs/tsconfig.json +0 -3
- package/node_modules/@rviscomi/capo.js/src/crx/capo.js +0 -62
- package/node_modules/@rviscomi/capo.js/src/crx/options.js +0 -69
- package/node_modules/astrojs-compiler-sync/LICENSE +0 -53
- package/node_modules/astrojs-compiler-sync/README.md +0 -3
- package/node_modules/astrojs-compiler-sync/browser/index.d.ts +0 -6
- package/node_modules/astrojs-compiler-sync/browser/index.js +0 -76
- package/node_modules/astrojs-compiler-sync/browser/wasm_exec.js +0 -665
- package/node_modules/astrojs-compiler-sync/lib/astrojs-compiler-worker.js +0 -5
- package/node_modules/astrojs-compiler-sync/lib/compiler-sync.cjs +0 -31
- package/node_modules/astrojs-compiler-sync/lib/index.cjs +0 -30
- package/node_modules/astrojs-compiler-sync/lib/index.d.cts +0 -3
- package/node_modules/astrojs-compiler-sync/lib/index.d.ts +0 -14
- package/node_modules/astrojs-compiler-sync/lib/index.js +0 -18
- package/node_modules/astrojs-compiler-sync/package.json +0 -100
- package/node_modules/entities/LICENSE +0 -11
- package/node_modules/entities/dist/decode-codepoint.d.ts +0 -8
- package/node_modules/entities/dist/decode-codepoint.d.ts.map +0 -1
- package/node_modules/entities/dist/decode-codepoint.js +0 -46
- package/node_modules/entities/dist/decode-codepoint.js.map +0 -1
- package/node_modules/entities/dist/decode.d.ts +0 -194
- package/node_modules/entities/dist/decode.d.ts.map +0 -1
- package/node_modules/entities/dist/decode.js +0 -544
- package/node_modules/entities/dist/decode.js.map +0 -1
- package/node_modules/entities/dist/encode.d.ts +0 -24
- package/node_modules/entities/dist/encode.d.ts.map +0 -1
- package/node_modules/entities/dist/encode.js +0 -90
- package/node_modules/entities/dist/encode.js.map +0 -1
- package/node_modules/entities/dist/escape.d.ts +0 -48
- package/node_modules/entities/dist/escape.d.ts.map +0 -1
- package/node_modules/entities/dist/escape.js +0 -132
- package/node_modules/entities/dist/escape.js.map +0 -1
- package/node_modules/entities/dist/generated/decode-data-html.d.ts +0 -3
- package/node_modules/entities/dist/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/entities/dist/generated/decode-data-html.js +0 -5
- package/node_modules/entities/dist/generated/decode-data-html.js.map +0 -1
- package/node_modules/entities/dist/generated/decode-data-xml.d.ts +0 -3
- package/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/entities/dist/generated/decode-data-xml.js +0 -5
- package/node_modules/entities/dist/generated/decode-data-xml.js.map +0 -1
- package/node_modules/entities/dist/generated/encode-html.d.ts +0 -5
- package/node_modules/entities/dist/generated/encode-html.d.ts.map +0 -1
- package/node_modules/entities/dist/generated/encode-html.js +0 -12
- package/node_modules/entities/dist/generated/encode-html.js.map +0 -1
- package/node_modules/entities/dist/index.d.ts +0 -89
- package/node_modules/entities/dist/index.d.ts.map +0 -1
- package/node_modules/entities/dist/index.js +0 -91
- package/node_modules/entities/dist/index.js.map +0 -1
- package/node_modules/entities/dist/internal/bin-trie-flags.d.ts +0 -17
- package/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +0 -1
- package/node_modules/entities/dist/internal/bin-trie-flags.js +0 -18
- package/node_modules/entities/dist/internal/bin-trie-flags.js.map +0 -1
- package/node_modules/entities/dist/internal/decode-shared.d.ts +0 -7
- package/node_modules/entities/dist/internal/decode-shared.d.ts.map +0 -1
- package/node_modules/entities/dist/internal/decode-shared.js +0 -17
- package/node_modules/entities/dist/internal/decode-shared.js.map +0 -1
- package/node_modules/entities/dist/internal/encode-shared.d.ts +0 -33
- package/node_modules/entities/dist/internal/encode-shared.d.ts.map +0 -1
- package/node_modules/entities/dist/internal/encode-shared.js +0 -93
- package/node_modules/entities/dist/internal/encode-shared.js.map +0 -1
- package/node_modules/entities/package.json +0 -83
- package/node_modules/entities/readme.md +0 -131
- package/node_modules/entities/src/decode-codepoint.ts +0 -50
- package/node_modules/entities/src/decode.ts +0 -671
- package/node_modules/entities/src/encode.ts +0 -95
- package/node_modules/entities/src/escape.ts +0 -160
- package/node_modules/entities/src/generated/decode-data-html.ts +0 -7
- package/node_modules/entities/src/generated/decode-data-xml.ts +0 -7
- package/node_modules/entities/src/generated/encode-html.ts +0 -18
- package/node_modules/entities/src/index.ts +0 -162
- package/node_modules/entities/src/internal/bin-trie-flags.ts +0 -16
- package/node_modules/entities/src/internal/decode-shared.ts +0 -18
- package/node_modules/entities/src/internal/encode-shared.ts +0 -123
- package/node_modules/parse5/README.md +0 -38
- package/node_modules/parse5/dist/common/doctype.d.ts +0 -4
- package/node_modules/parse5/dist/common/doctype.js +0 -114
- package/node_modules/parse5/dist/common/error-codes.d.ts +0 -67
- package/node_modules/parse5/dist/common/error-codes.js +0 -63
- package/node_modules/parse5/dist/common/foreign-content.d.ts +0 -9
- package/node_modules/parse5/dist/common/foreign-content.js +0 -228
- package/node_modules/parse5/dist/common/html.d.ts +0 -289
- package/node_modules/parse5/dist/common/html.js +0 -523
- package/node_modules/parse5/dist/common/token.d.ts +0 -84
- package/node_modules/parse5/dist/common/token.js +0 -20
- package/node_modules/parse5/dist/common/unicode.d.ts +0 -42
- package/node_modules/parse5/dist/common/unicode.js +0 -62
- package/node_modules/parse5/dist/index.d.ts +0 -71
- package/node_modules/parse5/dist/index.js +0 -42
- package/node_modules/parse5/dist/parser/formatting-element-list.d.ts +0 -36
- package/node_modules/parse5/dist/parser/formatting-element-list.js +0 -110
- package/node_modules/parse5/dist/parser/index.d.ts +0 -221
- package/node_modules/parse5/dist/parser/index.js +0 -3245
- package/node_modules/parse5/dist/parser/open-element-stack.d.ts +0 -53
- package/node_modules/parse5/dist/parser/open-element-stack.js +0 -324
- package/node_modules/parse5/dist/serializer/index.d.ts +0 -60
- package/node_modules/parse5/dist/serializer/index.js +0 -168
- package/node_modules/parse5/dist/tokenizer/index.d.ts +0 -247
- package/node_modules/parse5/dist/tokenizer/index.js +0 -2712
- package/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +0 -36
- package/node_modules/parse5/dist/tokenizer/preprocessor.js +0 -196
- package/node_modules/parse5/dist/tree-adapters/default.d.ts +0 -84
- package/node_modules/parse5/dist/tree-adapters/default.js +0 -173
- package/node_modules/parse5/dist/tree-adapters/interface.d.ts +0 -255
- package/node_modules/parse5/dist/tree-adapters/interface.js +0 -1
- package/node_modules/parse5/package.json +0 -53
- package/node_modules/synckit/README.md +0 -256
- package/node_modules/synckit/lib/common.d.ts +0 -5
- package/node_modules/synckit/lib/common.js +0 -22
- package/node_modules/synckit/lib/common.js.map +0 -1
- package/node_modules/synckit/lib/constants.d.ts +0 -38
- package/node_modules/synckit/lib/constants.js +0 -54
- package/node_modules/synckit/lib/constants.js.map +0 -1
- package/node_modules/synckit/lib/helpers.d.ts +0 -27
- package/node_modules/synckit/lib/helpers.js +0 -411
- package/node_modules/synckit/lib/helpers.js.map +0 -1
- package/node_modules/synckit/lib/index.cjs +0 -588
- package/node_modules/synckit/lib/index.d.cts +0 -138
- package/node_modules/synckit/lib/index.d.ts +0 -7
- package/node_modules/synckit/lib/index.js +0 -68
- package/node_modules/synckit/lib/index.js.map +0 -1
- package/node_modules/synckit/lib/types.d.ts +0 -48
- package/node_modules/synckit/lib/types.js +0 -2
- package/node_modules/synckit/lib/types.js.map +0 -1
- package/node_modules/synckit/package.json +0 -45
- package/node_modules/yaml-eslint-parser/lib/chunk-15K8U1wQ.mjs +0 -18
- /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/background.js +0 -0
- /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/capo.css +0 -0
- /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/images/icon128.png +0 -0
- /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/images/icon256.png +0 -0
- /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/options/options.css +0 -0
- /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/options/options.html +0 -0
- /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/styles/open-props.css +0 -0
- /package/node_modules/@rviscomi/capo.js/{docs/src/assets/capo256.png → dist/firefox/images/icon256.png} +0 -0
- /package/node_modules/eslint-plugin-toml/lib/{chunk-CfYAbeIz.mjs → rolldown-runtime-D7D4PA-g.mjs} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -54,36 +55,70 @@ function getInvalidBackgroundColor(elementColor) {
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
// src/lib/io.js
|
|
57
|
-
var IO = class {
|
|
58
|
-
|
|
58
|
+
var IO = class _IO {
|
|
59
|
+
/**
|
|
60
|
+
* @param {Document|null} document
|
|
61
|
+
* @param {Options} options
|
|
62
|
+
* @param {ConsoleOutput|any} [output=window.console]
|
|
63
|
+
*/
|
|
64
|
+
constructor(document2, options, output = typeof window !== "undefined" ? window.console : console) {
|
|
59
65
|
this.document = document2;
|
|
60
66
|
this.options = options;
|
|
61
67
|
this.console = output;
|
|
62
68
|
this.isStaticHead = false;
|
|
63
69
|
this.head = null;
|
|
64
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* @param {string} html
|
|
73
|
+
* @returns {string}
|
|
74
|
+
*/
|
|
75
|
+
static formatStaticHeadHTML(html) {
|
|
76
|
+
if (/<head[\s>]/i.test(html)) {
|
|
77
|
+
return html.replace(/(\<\/?)(head)/gi, "$1static-head");
|
|
78
|
+
}
|
|
79
|
+
return `<static-head>${html}</static-head>`;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @param {any} head
|
|
83
|
+
*/
|
|
84
|
+
initFromStaticHead(head) {
|
|
85
|
+
this.head = head;
|
|
86
|
+
this.isStaticHead = true;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* @param {string} html
|
|
90
|
+
*/
|
|
91
|
+
initFromHTML(html) {
|
|
92
|
+
const formattedHtml = _IO.formatStaticHeadHTML(html.trim());
|
|
93
|
+
const parser = new (this.document?.defaultView?.DOMParser || DOMParser)();
|
|
94
|
+
const staticDoc = parser.parseFromString(formattedHtml, "text/html");
|
|
95
|
+
this.initFromStaticHead(staticDoc.querySelector("static-head") || staticDoc.head);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @returns {Promise<void>}
|
|
99
|
+
*/
|
|
65
100
|
async init() {
|
|
66
101
|
if (this.head) {
|
|
67
102
|
return;
|
|
68
103
|
}
|
|
69
104
|
if (this.options.prefersDynamicAssessment()) {
|
|
70
|
-
this.head = this.document
|
|
105
|
+
this.head = this.document?.querySelector("head") || null;
|
|
71
106
|
return;
|
|
72
107
|
}
|
|
73
108
|
try {
|
|
74
109
|
let html = await this.getStaticHTML();
|
|
75
|
-
html =
|
|
76
|
-
const
|
|
77
|
-
staticDoc
|
|
78
|
-
|
|
79
|
-
if (
|
|
80
|
-
this.
|
|
110
|
+
html = _IO.formatStaticHeadHTML(html);
|
|
111
|
+
const parser = new (this.document?.defaultView?.DOMParser || DOMParser)();
|
|
112
|
+
const staticDoc = parser.parseFromString(html, "text/html");
|
|
113
|
+
const staticHead = staticDoc.querySelector("static-head");
|
|
114
|
+
if (staticHead) {
|
|
115
|
+
this.initFromStaticHead(staticHead);
|
|
81
116
|
} else {
|
|
82
|
-
this.head = this.document
|
|
117
|
+
this.head = this.document?.head || null;
|
|
83
118
|
}
|
|
84
119
|
} catch (e) {
|
|
85
120
|
this.console.error(`${this.options.loggingPrefix}An exception occurred while getting the static <head>:`, e);
|
|
86
|
-
this.head = this.document
|
|
121
|
+
this.head = this.document?.head || null;
|
|
87
122
|
}
|
|
88
123
|
if (!this.isStaticHead) {
|
|
89
124
|
this.console.warn(
|
|
@@ -92,46 +127,73 @@ var IO = class {
|
|
|
92
127
|
);
|
|
93
128
|
}
|
|
94
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* @returns {Promise<string>}
|
|
132
|
+
*/
|
|
95
133
|
async getStaticHTML() {
|
|
96
|
-
const url = this.document
|
|
134
|
+
const url = this.document?.location.href || "";
|
|
97
135
|
const response = await fetch(url);
|
|
98
136
|
return await response.text();
|
|
99
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* @returns {any}
|
|
140
|
+
*/
|
|
100
141
|
getHead() {
|
|
101
142
|
return this.head;
|
|
102
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* @param {any} element
|
|
146
|
+
* @returns {string}
|
|
147
|
+
*/
|
|
103
148
|
stringifyElement(element) {
|
|
104
149
|
return element.getAttributeNames().reduce((id, attr) => {
|
|
105
150
|
return id += `[${CSS.escape(attr)}=${JSON.stringify(element.getAttribute(attr))}]`;
|
|
106
151
|
}, element.nodeName);
|
|
107
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* @param {any} element
|
|
155
|
+
* @returns {any}
|
|
156
|
+
*/
|
|
108
157
|
getLoggableElement(element) {
|
|
109
158
|
if (!this.isStaticHead) {
|
|
110
159
|
return element;
|
|
111
160
|
}
|
|
161
|
+
const head = this.document?.head || this.head;
|
|
162
|
+
if (!head) {
|
|
163
|
+
return element;
|
|
164
|
+
}
|
|
112
165
|
const selector = this.stringifyElement(element);
|
|
113
|
-
const candidates = Array.from(
|
|
166
|
+
const candidates = Array.from(head.querySelectorAll(selector));
|
|
114
167
|
if (candidates.length == 0) {
|
|
115
168
|
return element;
|
|
116
169
|
}
|
|
117
170
|
if (candidates.length == 1) {
|
|
118
171
|
return candidates[0];
|
|
119
172
|
}
|
|
120
|
-
const candidateWrapper = this.document.createElement("div");
|
|
121
|
-
const elementWrapper = this.document.createElement("div");
|
|
122
|
-
elementWrapper.innerHTML = element.innerHTML;
|
|
123
173
|
const candidate = candidates.find((c) => {
|
|
124
|
-
|
|
125
|
-
|
|
174
|
+
if (c.childNodes.length !== element.childNodes.length) {
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
for (let i = 0; i < c.childNodes.length; i++) {
|
|
178
|
+
if (!c.childNodes[i].isEqualNode(element.childNodes[i])) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return true;
|
|
126
183
|
});
|
|
127
184
|
if (candidate) {
|
|
128
185
|
return candidate;
|
|
129
186
|
}
|
|
130
187
|
return element;
|
|
131
188
|
}
|
|
132
|
-
|
|
189
|
+
/**
|
|
190
|
+
* Create an element from a CSS selector
|
|
191
|
+
* @param {string} selector
|
|
192
|
+
* @returns {any}
|
|
193
|
+
*/
|
|
133
194
|
createElementFromSelector(selector) {
|
|
134
|
-
const
|
|
195
|
+
const match = selector.match(/^[A-Za-z]+/);
|
|
196
|
+
const tagName = match ? match[0] : null;
|
|
135
197
|
if (!tagName) {
|
|
136
198
|
return;
|
|
137
199
|
}
|
|
@@ -146,14 +208,20 @@ var IO = class {
|
|
|
146
208
|
});
|
|
147
209
|
return element;
|
|
148
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* @param {AnalysisResult} result
|
|
213
|
+
* @returns {HeadWeightInfo[]}
|
|
214
|
+
*/
|
|
149
215
|
logAnalysis(result) {
|
|
150
216
|
const headElement = this.getHead();
|
|
151
217
|
const headWeights = result.weights.map((w) => {
|
|
152
218
|
const customValidation = result.customValidations.find((v) => v.element === w.element);
|
|
219
|
+
const validationWarning = result.validationWarnings.find((v) => v.element === w.element || v.elements && v.elements.includes(w.element));
|
|
220
|
+
const isElementValid = !customValidation && !validationWarning;
|
|
153
221
|
return {
|
|
154
222
|
element: w.element,
|
|
155
223
|
weight: w.weight,
|
|
156
|
-
isValid:
|
|
224
|
+
isValid: isElementValid,
|
|
157
225
|
customValidations: customValidation || {}
|
|
158
226
|
};
|
|
159
227
|
});
|
|
@@ -174,14 +242,34 @@ var IO = class {
|
|
|
174
242
|
this.visualizeHead("Sorted", sortedHeadElement, sortedHeadWeights);
|
|
175
243
|
return headWeights;
|
|
176
244
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
245
|
+
/**
|
|
246
|
+
* @param {Object} params
|
|
247
|
+
* @param {number|string} params.weight
|
|
248
|
+
* @param {string} params.selector
|
|
249
|
+
* @param {string} params.html
|
|
250
|
+
* @param {boolean} [params.isValid]
|
|
251
|
+
* @param {Record<string, any>} [params.customValidations]
|
|
252
|
+
*/
|
|
253
|
+
logElementFromSelector({ weight, selector, html, isValid, customValidations = {} }) {
|
|
254
|
+
const numWeight = +weight;
|
|
255
|
+
const viz = this.getElementVisualization(numWeight, isValid);
|
|
180
256
|
let element = this.createElementFromSelector(selector);
|
|
181
|
-
|
|
257
|
+
const parser = new (this.document?.defaultView?.DOMParser || DOMParser)();
|
|
258
|
+
const doc = parser.parseFromString(html || "", "text/html");
|
|
259
|
+
const nodes = [...doc.head.childNodes, ...doc.body.childNodes];
|
|
260
|
+
nodes.forEach((child) => element.appendChild(child.cloneNode(true)));
|
|
182
261
|
element = this.getLoggableElement(element);
|
|
183
|
-
this.logElement({ viz, weight, element, isValid, customValidations });
|
|
262
|
+
this.logElement({ viz, weight: numWeight, element, isValid, customValidations });
|
|
184
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
* @param {Object} params
|
|
266
|
+
* @param {ElementVisualization} params.viz
|
|
267
|
+
* @param {number} params.weight
|
|
268
|
+
* @param {any} params.element
|
|
269
|
+
* @param {boolean} [params.isValid]
|
|
270
|
+
* @param {Record<string, any>} [params.customValidations]
|
|
271
|
+
* @param {boolean} [params.omitPrefix]
|
|
272
|
+
*/
|
|
185
273
|
logElement({ viz, weight, element, isValid, customValidations = {}, omitPrefix = false }) {
|
|
186
274
|
if (!omitPrefix) {
|
|
187
275
|
viz.visual = `${this.options.loggingPrefix}${viz.visual}`;
|
|
@@ -193,7 +281,7 @@ var IO = class {
|
|
|
193
281
|
return;
|
|
194
282
|
}
|
|
195
283
|
const { payload, warnings } = customValidations;
|
|
196
|
-
if (payload) {
|
|
284
|
+
if (payload && Object.keys(payload).length > 0) {
|
|
197
285
|
if (typeof payload.expiry == "string") {
|
|
198
286
|
payload.expiry = new Date(payload.expiry);
|
|
199
287
|
}
|
|
@@ -209,6 +297,9 @@ var IO = class {
|
|
|
209
297
|
}
|
|
210
298
|
this.console[loggingLevel](...args);
|
|
211
299
|
}
|
|
300
|
+
/**
|
|
301
|
+
* @param {Array<import('../analyzer.js').ValidationWarning>} warnings
|
|
302
|
+
*/
|
|
212
303
|
logValidationWarnings(warnings) {
|
|
213
304
|
if (!this.options.isValidationEnabled()) {
|
|
214
305
|
return;
|
|
@@ -218,16 +309,24 @@ var IO = class {
|
|
|
218
309
|
this.console.warn(`${this.options.loggingPrefix}${warning}`, ...elements, element || "");
|
|
219
310
|
});
|
|
220
311
|
}
|
|
312
|
+
/**
|
|
313
|
+
* @param {number} weight
|
|
314
|
+
* @returns {string}
|
|
315
|
+
*/
|
|
221
316
|
getColor(weight) {
|
|
222
317
|
return this.options.palette[10 - weight];
|
|
223
318
|
}
|
|
319
|
+
/**
|
|
320
|
+
* @param {HeadWeightInfo[]} elements
|
|
321
|
+
* @returns {HeadVisualization}
|
|
322
|
+
*/
|
|
224
323
|
getHeadVisualization(elements) {
|
|
225
324
|
let visual = "";
|
|
226
325
|
const styles = [];
|
|
227
326
|
elements.forEach(({ weight, isValid }) => {
|
|
228
327
|
visual += "%c ";
|
|
229
328
|
const color = this.getColor(weight);
|
|
230
|
-
let style = `padding: 5px; margin:
|
|
329
|
+
let style = `padding: 5px; margin: 4px -1px 0; display: inline-block; `;
|
|
231
330
|
if (isValid) {
|
|
232
331
|
style += `background-color: ${color};`;
|
|
233
332
|
} else {
|
|
@@ -237,12 +336,22 @@ var IO = class {
|
|
|
237
336
|
});
|
|
238
337
|
return { visual, styles };
|
|
239
338
|
}
|
|
339
|
+
/**
|
|
340
|
+
* @param {number} weight
|
|
341
|
+
* @param {boolean} [isValid=true]
|
|
342
|
+
* @returns {ElementVisualization}
|
|
343
|
+
*/
|
|
240
344
|
getElementVisualization(weight, isValid = true) {
|
|
241
345
|
const visual = `%c${new Array(weight + 1).fill("\u2588").join("")}`;
|
|
242
346
|
const color = this.getColor(weight);
|
|
243
347
|
let style = `color: ${color}`;
|
|
244
348
|
return { visual, style };
|
|
245
349
|
}
|
|
350
|
+
/**
|
|
351
|
+
* @param {string} groupName
|
|
352
|
+
* @param {any} headElement
|
|
353
|
+
* @param {HeadWeightInfo[]} headWeights
|
|
354
|
+
*/
|
|
246
355
|
visualizeHead(groupName, headElement, headWeights) {
|
|
247
356
|
const headViz = this.getHeadVisualization(headWeights);
|
|
248
357
|
this.console.groupCollapsed(
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -66,41 +67,69 @@ var Palettes = {
|
|
|
66
67
|
|
|
67
68
|
// src/lib/options.js
|
|
68
69
|
var Options = class _Options {
|
|
70
|
+
/**
|
|
71
|
+
* @param {OptionsInit} [options={}]
|
|
72
|
+
*/
|
|
69
73
|
constructor({
|
|
70
74
|
preferredAssessmentMode = _Options.AssessmentMode.STATIC,
|
|
71
75
|
validation = true,
|
|
72
76
|
palette = DEFAULT,
|
|
73
77
|
loggingPrefix = "Capo: "
|
|
74
78
|
} = {}) {
|
|
79
|
+
this.preferredAssessmentMode = _Options.AssessmentMode.STATIC;
|
|
80
|
+
this.validation = true;
|
|
81
|
+
this.palette = DEFAULT;
|
|
82
|
+
this.loggingPrefix = "Capo: ";
|
|
75
83
|
this.setPreferredAssessmentMode(preferredAssessmentMode);
|
|
76
84
|
this.setValidation(validation);
|
|
77
85
|
this.setPalette(palette);
|
|
78
86
|
this.setLoggingPrefix(loggingPrefix);
|
|
79
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* @returns {{ STATIC: 'static', DYNAMIC: 'dynamic' }}
|
|
90
|
+
*/
|
|
80
91
|
static get AssessmentMode() {
|
|
81
92
|
return {
|
|
82
93
|
STATIC: "static",
|
|
83
94
|
DYNAMIC: "dynamic"
|
|
84
95
|
};
|
|
85
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* @returns {Record<string, string[]>}
|
|
99
|
+
*/
|
|
86
100
|
static get Palettes() {
|
|
87
101
|
return Palettes;
|
|
88
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* @returns {boolean}
|
|
105
|
+
*/
|
|
89
106
|
prefersStaticAssessment() {
|
|
90
107
|
return this.preferredAssessmentMode === _Options.AssessmentMode.STATIC;
|
|
91
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* @returns {boolean}
|
|
111
|
+
*/
|
|
92
112
|
prefersDynamicAssessment() {
|
|
93
113
|
return this.preferredAssessmentMode === _Options.AssessmentMode.DYNAMIC;
|
|
94
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* @returns {boolean}
|
|
117
|
+
*/
|
|
95
118
|
isValidationEnabled() {
|
|
96
119
|
return this.validation;
|
|
97
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* @param {string} preferredAssessmentMode
|
|
123
|
+
*/
|
|
98
124
|
setPreferredAssessmentMode(preferredAssessmentMode) {
|
|
99
125
|
if (!this.isValidAssessmentMode(preferredAssessmentMode)) {
|
|
100
126
|
throw new Error(`Invalid option: preferred assessment mode, expected AssessmentMode.STATIC or AssessmentMode.DYNAMIC, got "${preferredAssessmentMode}".`);
|
|
101
127
|
}
|
|
102
128
|
this.preferredAssessmentMode = preferredAssessmentMode;
|
|
103
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* @param {boolean} prefersStatic
|
|
132
|
+
*/
|
|
104
133
|
setPreferredAssessmentModeToStatic(prefersStatic) {
|
|
105
134
|
let mode = _Options.AssessmentMode.STATIC;
|
|
106
135
|
if (!prefersStatic) {
|
|
@@ -108,12 +137,18 @@ var Options = class _Options {
|
|
|
108
137
|
}
|
|
109
138
|
this.setPreferredAssessmentMode(mode);
|
|
110
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* @param {boolean} validation
|
|
142
|
+
*/
|
|
111
143
|
setValidation(validation) {
|
|
112
144
|
if (!this.isValidValidation(validation)) {
|
|
113
145
|
throw new Error(`Invalid option: validation, expected boolean, got "${validation}".`);
|
|
114
146
|
}
|
|
115
147
|
this.validation = validation;
|
|
116
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* @param {string | string[]} palette
|
|
151
|
+
*/
|
|
117
152
|
setPalette(palette) {
|
|
118
153
|
if (!this.isValidPalette(palette)) {
|
|
119
154
|
throw new Error(`Invalid option: palette, expected [${Object.keys(Palettes).join("|")}] or an array of colors, got "${palette}".`);
|
|
@@ -124,18 +159,33 @@ var Options = class _Options {
|
|
|
124
159
|
}
|
|
125
160
|
this.palette = palette;
|
|
126
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* @param {string} loggingPrefix
|
|
164
|
+
*/
|
|
127
165
|
setLoggingPrefix(loggingPrefix) {
|
|
128
166
|
if (!this.isValidLoggingPrefix(loggingPrefix)) {
|
|
129
167
|
throw new Error(`Invalid option: logging prefix, expected string, got "${loggingPrefix}".`);
|
|
130
168
|
}
|
|
131
169
|
this.loggingPrefix = loggingPrefix;
|
|
132
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* @param {any} assessmentMode
|
|
173
|
+
* @returns {boolean}
|
|
174
|
+
*/
|
|
133
175
|
isValidAssessmentMode(assessmentMode) {
|
|
134
176
|
return Object.values(_Options.AssessmentMode).includes(assessmentMode);
|
|
135
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* @param {any} validation
|
|
180
|
+
* @returns {boolean}
|
|
181
|
+
*/
|
|
136
182
|
isValidValidation(validation) {
|
|
137
183
|
return typeof validation === "boolean";
|
|
138
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* @param {any} palette
|
|
187
|
+
* @returns {boolean}
|
|
188
|
+
*/
|
|
139
189
|
isValidPalette(palette) {
|
|
140
190
|
if (typeof palette === "string") {
|
|
141
191
|
return Object.keys(Palettes).includes(palette);
|
|
@@ -145,12 +195,23 @@ var Options = class _Options {
|
|
|
145
195
|
}
|
|
146
196
|
return palette.length === 11 && palette.every((color) => typeof color === "string");
|
|
147
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* @param {any} loggingPrefix
|
|
200
|
+
* @returns {boolean}
|
|
201
|
+
*/
|
|
148
202
|
isValidLoggingPrefix(loggingPrefix) {
|
|
149
203
|
return typeof loggingPrefix === "string";
|
|
150
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* @param {string[]} palette
|
|
207
|
+
* @returns {boolean}
|
|
208
|
+
*/
|
|
151
209
|
isPreferredPalette(palette) {
|
|
152
210
|
return JSON.stringify(this.palette) == JSON.stringify(palette);
|
|
153
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* @returns {OptionsValue}
|
|
214
|
+
*/
|
|
154
215
|
valueOf() {
|
|
155
216
|
return {
|
|
156
217
|
preferredAssessmentMode: this.preferredAssessmentMode,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -51,18 +52,6 @@ var ElementWeights = {
|
|
|
51
52
|
PREFETCH_PRERENDER: 1,
|
|
52
53
|
OTHER: 0
|
|
53
54
|
};
|
|
54
|
-
var ElementDetectors = {
|
|
55
|
-
META: isMeta,
|
|
56
|
-
TITLE: isTitle,
|
|
57
|
-
PRECONNECT: isPreconnect,
|
|
58
|
-
ASYNC_SCRIPT: isAsyncScript,
|
|
59
|
-
IMPORT_STYLES: isImportStyles,
|
|
60
|
-
SYNC_SCRIPT: isSyncScript,
|
|
61
|
-
SYNC_STYLES: isSyncStyles,
|
|
62
|
-
PRELOAD: isPreload,
|
|
63
|
-
DEFER_SCRIPT: isDeferScript,
|
|
64
|
-
PREFETCH_PRERENDER: isPrefetchPrerender
|
|
65
|
-
};
|
|
66
55
|
var META_HTTP_EQUIV_KEYWORDS = [
|
|
67
56
|
"accept-ch",
|
|
68
57
|
"content-security-policy",
|
|
@@ -110,6 +99,10 @@ function isAsyncScript(element, adapter) {
|
|
|
110
99
|
function isImportStyles(element, adapter) {
|
|
111
100
|
const importRe = /@import/;
|
|
112
101
|
if (adapter.getTagName(element) === "style") {
|
|
102
|
+
const media = adapter.getAttribute(element, "media");
|
|
103
|
+
if (media && media.toLowerCase().trim() === "print") {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
113
106
|
return importRe.test(adapter.getTextContent(element));
|
|
114
107
|
}
|
|
115
108
|
return false;
|
|
@@ -139,11 +132,21 @@ function isSyncScript(element, adapter) {
|
|
|
139
132
|
function isSyncStyles(element, adapter) {
|
|
140
133
|
const tagName = adapter.getTagName(element);
|
|
141
134
|
if (tagName === "style") {
|
|
135
|
+
const media = adapter.getAttribute(element, "media");
|
|
136
|
+
if (media && media.toLowerCase().trim() === "print") {
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
142
139
|
return true;
|
|
143
140
|
}
|
|
144
141
|
if (tagName === "link") {
|
|
145
142
|
const rel = adapter.getAttribute(element, "rel");
|
|
146
|
-
|
|
143
|
+
if (rel?.toLowerCase() === "stylesheet") {
|
|
144
|
+
const media = adapter.getAttribute(element, "media");
|
|
145
|
+
if (media && media.toLowerCase().trim() === "print") {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
147
150
|
}
|
|
148
151
|
return false;
|
|
149
152
|
}
|
|
@@ -203,6 +206,18 @@ function isMetaCSP(element, adapter) {
|
|
|
203
206
|
const httpEquivLower = httpEquiv.toLowerCase();
|
|
204
207
|
return httpEquivLower === "content-security-policy" || httpEquivLower === "content-security-policy-report-only";
|
|
205
208
|
}
|
|
209
|
+
var ElementDetectors = {
|
|
210
|
+
META: isMeta,
|
|
211
|
+
TITLE: isTitle,
|
|
212
|
+
PRECONNECT: isPreconnect,
|
|
213
|
+
ASYNC_SCRIPT: isAsyncScript,
|
|
214
|
+
IMPORT_STYLES: isImportStyles,
|
|
215
|
+
SYNC_SCRIPT: isSyncScript,
|
|
216
|
+
SYNC_STYLES: isSyncStyles,
|
|
217
|
+
PRELOAD: isPreload,
|
|
218
|
+
DEFER_SCRIPT: isDeferScript,
|
|
219
|
+
PREFETCH_PRERENDER: isPrefetchPrerender
|
|
220
|
+
};
|
|
206
221
|
function getWeight(element, adapter) {
|
|
207
222
|
for (let [id, detector] of Object.entries(ElementDetectors)) {
|
|
208
223
|
if (detector(element, adapter)) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -175,6 +176,16 @@ function getValidationWarnings(head, adapter) {
|
|
|
175
176
|
}
|
|
176
177
|
children.forEach((element) => {
|
|
177
178
|
if (isValidElement(element, adapter)) {
|
|
179
|
+
const elementChildren = adapter.getChildren(element);
|
|
180
|
+
elementChildren.forEach((child) => {
|
|
181
|
+
if (!isValidElement(child, adapter)) {
|
|
182
|
+
validationWarnings.push({
|
|
183
|
+
ruleId: "no-invalid-head-elements",
|
|
184
|
+
warning: `${adapter.getTagName(child).toUpperCase()} elements are not allowed in the <head>`,
|
|
185
|
+
element
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
});
|
|
178
189
|
return;
|
|
179
190
|
}
|
|
180
191
|
validationWarnings.push({
|
|
@@ -224,7 +235,7 @@ function getCustomValidations(element, adapter, parentElement = null) {
|
|
|
224
235
|
};
|
|
225
236
|
results.forEach((result) => {
|
|
226
237
|
if (result.warnings) {
|
|
227
|
-
combined.warnings
|
|
238
|
+
combined.warnings?.push(...result.warnings);
|
|
228
239
|
}
|
|
229
240
|
if (result.payload) {
|
|
230
241
|
Object.assign(combined.payload, result.payload);
|
|
@@ -285,7 +296,7 @@ function isInvalidOriginTrial(element, adapter) {
|
|
|
285
296
|
return false;
|
|
286
297
|
}
|
|
287
298
|
const { warnings } = validateOriginTrial(element, adapter);
|
|
288
|
-
return warnings
|
|
299
|
+
return (warnings?.length ?? 0) > 0;
|
|
289
300
|
}
|
|
290
301
|
function validateOriginTrial(element, adapter) {
|
|
291
302
|
const metadata = {
|
|
@@ -297,25 +308,26 @@ function validateOriginTrial(element, adapter) {
|
|
|
297
308
|
try {
|
|
298
309
|
metadata.payload = decodeOriginTrialToken(token);
|
|
299
310
|
} catch {
|
|
300
|
-
metadata.warnings
|
|
311
|
+
metadata.warnings?.push("Invalid origin trial token: invalid token");
|
|
301
312
|
return metadata;
|
|
302
313
|
}
|
|
303
314
|
if (metadata.payload.expiry < /* @__PURE__ */ new Date()) {
|
|
304
|
-
metadata.warnings
|
|
315
|
+
metadata.warnings?.push("Invalid origin trial token: expired");
|
|
305
316
|
}
|
|
306
317
|
if (typeof document !== "undefined" && document.location && document.location.href) {
|
|
307
318
|
if (!isSameOrigin(metadata.payload.origin, document.location.href)) {
|
|
308
319
|
const subdomain = isSubdomain(metadata.payload.origin, document.location.href);
|
|
309
320
|
if (subdomain && !metadata.payload.isSubdomain) {
|
|
310
|
-
metadata.warnings
|
|
321
|
+
metadata.warnings?.push("Invalid origin trial token: invalid subdomain");
|
|
311
322
|
} else if (!subdomain && !metadata.payload.isThirdParty) {
|
|
312
|
-
metadata.warnings
|
|
323
|
+
metadata.warnings?.push("Invalid origin trial token: invalid third-party origin");
|
|
313
324
|
}
|
|
314
325
|
}
|
|
315
326
|
}
|
|
316
327
|
return metadata;
|
|
317
328
|
}
|
|
318
329
|
function decodeOriginTrialToken(token) {
|
|
330
|
+
if (!token) throw new Error("Missing token");
|
|
319
331
|
const buffer = new Uint8Array([...atob(token)].map((a) => a.charCodeAt(0)));
|
|
320
332
|
const view = new DataView(buffer.buffer);
|
|
321
333
|
const length = view.getUint32(65, false);
|
|
@@ -327,9 +339,9 @@ function isSameOrigin(a, b) {
|
|
|
327
339
|
return new URL(a).origin === new URL(b).origin;
|
|
328
340
|
}
|
|
329
341
|
function isSubdomain(a, b) {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
return
|
|
342
|
+
const urlA = new URL(a);
|
|
343
|
+
const urlB = new URL(b);
|
|
344
|
+
return urlB.host.endsWith(`.${urlA.host}`);
|
|
333
345
|
}
|
|
334
346
|
function isDefaultStyle(element, adapter) {
|
|
335
347
|
if (adapter.getTagName(element) !== "meta") return false;
|
|
@@ -356,28 +368,28 @@ function isInvalidDefaultStyle(element, adapter) {
|
|
|
356
368
|
return false;
|
|
357
369
|
}
|
|
358
370
|
const { warnings } = validateDefaultStyle(element, adapter);
|
|
359
|
-
return warnings
|
|
371
|
+
return (warnings?.length ?? 0) > 0;
|
|
360
372
|
}
|
|
361
373
|
function isInvalidContentType(element, adapter) {
|
|
362
374
|
if (!isContentType(element, adapter)) {
|
|
363
375
|
return false;
|
|
364
376
|
}
|
|
365
377
|
const { warnings } = validateContentType(element, adapter);
|
|
366
|
-
return warnings
|
|
378
|
+
return (warnings?.length ?? 0) > 0;
|
|
367
379
|
}
|
|
368
380
|
function isInvalidHttpEquiv(element, adapter) {
|
|
369
381
|
if (!isHttpEquiv(element, adapter)) {
|
|
370
382
|
return false;
|
|
371
383
|
}
|
|
372
384
|
const { warnings } = validateHttpEquiv(element, adapter);
|
|
373
|
-
return warnings
|
|
385
|
+
return (warnings?.length ?? 0) > 0;
|
|
374
386
|
}
|
|
375
387
|
function isInvalidMetaViewport(element, adapter) {
|
|
376
388
|
if (!isMetaViewport(element, adapter)) {
|
|
377
389
|
return false;
|
|
378
390
|
}
|
|
379
391
|
const { warnings } = validateMetaViewport(element, adapter);
|
|
380
|
-
return warnings
|
|
392
|
+
return (warnings?.length ?? 0) > 0;
|
|
381
393
|
}
|
|
382
394
|
function isUnnecessaryPreload(element, adapter, parentElement = null) {
|
|
383
395
|
const tagName = adapter.getTagName(element);
|
|
@@ -538,7 +550,7 @@ function validateContentType(element, adapter) {
|
|
|
538
550
|
}
|
|
539
551
|
function validateHttpEquiv(element, adapter) {
|
|
540
552
|
const warnings = [];
|
|
541
|
-
const type = adapter.getAttribute(element, "http-equiv")
|
|
553
|
+
const type = adapter.getAttribute(element, "http-equiv")?.toLowerCase() || "";
|
|
542
554
|
const content = adapter.getAttribute(element, "content")?.toLowerCase();
|
|
543
555
|
switch (type) {
|
|
544
556
|
case "content-security-policy":
|
|
@@ -720,14 +732,16 @@ function validateMetaViewport(element, adapter) {
|
|
|
720
732
|
warnings.push(`Invalid maximum zoom level "${maxScale}". Values must be between 0.1 and 10.`);
|
|
721
733
|
}
|
|
722
734
|
if (maxScale < 2) {
|
|
723
|
-
warnings.push(
|
|
735
|
+
warnings.push(
|
|
736
|
+
`Disabling zoom levels under 2x can cause accessibility issues. Found "maximum-scale=${directives["maximum-scale"]}".`
|
|
737
|
+
);
|
|
724
738
|
}
|
|
725
739
|
}
|
|
726
740
|
if ("user-scalable" in directives) {
|
|
727
741
|
const userScalable = directives["user-scalable"];
|
|
728
742
|
if (userScalable == "no" || userScalable == "0") {
|
|
729
743
|
warnings.push(
|
|
730
|
-
`Disabling zooming can cause accessibility issues to users with visual impairments. Found "
|
|
744
|
+
`Disabling zooming can cause accessibility issues to users with visual impairments. Found "user-scalable=${userScalable}".`
|
|
731
745
|
);
|
|
732
746
|
}
|
|
733
747
|
if (!["0", "1", "yes", "no"].includes(userScalable)) {
|
|
@@ -770,6 +784,7 @@ function validateMetaViewport(element, adapter) {
|
|
|
770
784
|
return false;
|
|
771
785
|
}
|
|
772
786
|
if (directive == "viewport-fit") {
|
|
787
|
+
return false;
|
|
773
788
|
}
|
|
774
789
|
return true;
|
|
775
790
|
}).forEach((directive) => {
|
|
Binary file
|