@askviraj/linter 1.1.2 → 1.1.4
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/README.md +1 -0
- package/node_modules/eslint-plugin-yml/lib/index.mjs +125 -21
- package/node_modules/eslint-plugin-yml/package.json +7 -7
- 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,5 +1,21 @@
|
|
|
1
1
|
import { isMetaCSP, isOriginTrial } from './rules.js';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {import('../adapters/adapter.js').AdapterInterface} AdapterInterface
|
|
5
|
+
*
|
|
6
|
+
* @typedef {Object} ValidationWarningResult
|
|
7
|
+
* @property {string} ruleId
|
|
8
|
+
* @property {string} warning
|
|
9
|
+
* @property {any} [element]
|
|
10
|
+
* @property {any[]} [elements]
|
|
11
|
+
*
|
|
12
|
+
* @typedef {Object} CustomValidationResult
|
|
13
|
+
* @property {string} [ruleId]
|
|
14
|
+
* @property {string[]} [warnings]
|
|
15
|
+
* @property {any} [payload]
|
|
16
|
+
* @property {any} [element]
|
|
17
|
+
*/
|
|
18
|
+
|
|
3
19
|
export const VALID_HEAD_ELEMENTS = new Set([
|
|
4
20
|
"base",
|
|
5
21
|
"link",
|
|
@@ -17,6 +33,12 @@ export const HTTP_EQUIV_SELECTOR = "meta[http-equiv]";
|
|
|
17
33
|
|
|
18
34
|
export const PRELOAD_SELECTOR = 'link:is([rel="preload" i], [rel="modulepreload" i])';
|
|
19
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Check if element is a valid HTML <head> element
|
|
38
|
+
* @param {any} element
|
|
39
|
+
* @param {AdapterInterface} adapter
|
|
40
|
+
* @returns {boolean}
|
|
41
|
+
*/
|
|
20
42
|
export function isValidElement(element, adapter) {
|
|
21
43
|
const tagName = adapter.getTagName(element);
|
|
22
44
|
// Text nodes and comment nodes are valid (they don't have tag names)
|
|
@@ -29,7 +51,7 @@ export function isValidElement(element, adapter) {
|
|
|
29
51
|
/**
|
|
30
52
|
* Check if element has any invalid child elements
|
|
31
53
|
* @param {any} element - Element to check
|
|
32
|
-
* @param {
|
|
54
|
+
* @param {AdapterInterface} adapter - Adapter instance
|
|
33
55
|
* @returns {boolean}
|
|
34
56
|
*/
|
|
35
57
|
function hasInvalidChildren(element, adapter) {
|
|
@@ -40,7 +62,7 @@ function hasInvalidChildren(element, adapter) {
|
|
|
40
62
|
/**
|
|
41
63
|
* Check if this is a duplicate title element (2nd+ occurrence)
|
|
42
64
|
* @param {any} element - Element to check
|
|
43
|
-
* @param {
|
|
65
|
+
* @param {AdapterInterface} adapter - Adapter instance
|
|
44
66
|
* @returns {boolean}
|
|
45
67
|
*/
|
|
46
68
|
function isDuplicateTitle(element, adapter) {
|
|
@@ -69,7 +91,7 @@ function isDuplicateTitle(element, adapter) {
|
|
|
69
91
|
/**
|
|
70
92
|
* Check if this is a duplicate base element
|
|
71
93
|
* @param {any} element - Element to check
|
|
72
|
-
* @param {
|
|
94
|
+
* @param {AdapterInterface} adapter - Adapter instance
|
|
73
95
|
* @returns {boolean}
|
|
74
96
|
*/
|
|
75
97
|
function isDuplicateBase(element, adapter) {
|
|
@@ -80,6 +102,12 @@ function isDuplicateBase(element, adapter) {
|
|
|
80
102
|
return siblings.some(sibling => adapter.getTagName(sibling) === 'base');
|
|
81
103
|
}
|
|
82
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Check if an element has any validation warning
|
|
107
|
+
* @param {any} element
|
|
108
|
+
* @param {AdapterInterface} adapter
|
|
109
|
+
* @returns {boolean}
|
|
110
|
+
*/
|
|
83
111
|
export function hasValidationWarning(element, adapter) {
|
|
84
112
|
// Element itself is not valid.
|
|
85
113
|
if (!isValidElement(element, adapter)) {
|
|
@@ -141,11 +169,17 @@ export function hasValidationWarning(element, adapter) {
|
|
|
141
169
|
return true;
|
|
142
170
|
}
|
|
143
171
|
|
|
144
|
-
|
|
145
172
|
return false;
|
|
146
173
|
}
|
|
147
174
|
|
|
175
|
+
/**
|
|
176
|
+
* Get document-level validation warnings for a <head> element
|
|
177
|
+
* @param {any} head
|
|
178
|
+
* @param {AdapterInterface} adapter
|
|
179
|
+
* @returns {ValidationWarningResult[]}
|
|
180
|
+
*/
|
|
148
181
|
export function getValidationWarnings(head, adapter) {
|
|
182
|
+
/** @type {ValidationWarningResult[]} */
|
|
149
183
|
const validationWarnings = [];
|
|
150
184
|
|
|
151
185
|
// Get all children of head element
|
|
@@ -187,17 +221,22 @@ export function getValidationWarnings(head, adapter) {
|
|
|
187
221
|
});
|
|
188
222
|
}
|
|
189
223
|
|
|
190
|
-
// Note: CSP meta tags are validated in customValidations, not here
|
|
191
|
-
// to avoid duplicate reporting
|
|
192
|
-
|
|
193
224
|
// Check for invalid elements
|
|
194
225
|
children.forEach((element) => {
|
|
195
226
|
if (isValidElement(element, adapter)) {
|
|
227
|
+
const elementChildren = adapter.getChildren(element);
|
|
228
|
+
elementChildren.forEach((child) => {
|
|
229
|
+
if (!isValidElement(child, adapter)) {
|
|
230
|
+
validationWarnings.push({
|
|
231
|
+
ruleId: 'no-invalid-head-elements',
|
|
232
|
+
warning: `${adapter.getTagName(child).toUpperCase()} elements are not allowed in the <head>`,
|
|
233
|
+
element: element,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
});
|
|
196
237
|
return;
|
|
197
238
|
}
|
|
198
239
|
|
|
199
|
-
// For invalid elements, we just report the element itself
|
|
200
|
-
// (adapter doesn't have parentElement concept, so we can't find root)
|
|
201
240
|
validationWarnings.push({
|
|
202
241
|
ruleId: 'no-invalid-head-elements',
|
|
203
242
|
warning: `${adapter.getTagName(element)} elements are not allowed in the <head>`,
|
|
@@ -205,13 +244,18 @@ export function getValidationWarnings(head, adapter) {
|
|
|
205
244
|
});
|
|
206
245
|
});
|
|
207
246
|
|
|
208
|
-
// Note: Origin trials are validated in customValidations, not here
|
|
209
|
-
// to avoid duplicate reporting
|
|
210
|
-
|
|
211
247
|
return validationWarnings;
|
|
212
248
|
}
|
|
213
249
|
|
|
250
|
+
/**
|
|
251
|
+
* Get custom element-level validations for an element
|
|
252
|
+
* @param {any} element
|
|
253
|
+
* @param {AdapterInterface} adapter
|
|
254
|
+
* @param {any} [parentElement=null]
|
|
255
|
+
* @returns {CustomValidationResult}
|
|
256
|
+
*/
|
|
214
257
|
export function getCustomValidations(element, adapter, parentElement = null) {
|
|
258
|
+
/** @type {CustomValidationResult[]} */
|
|
215
259
|
const results = [];
|
|
216
260
|
|
|
217
261
|
if (isOriginTrial(element, adapter)) {
|
|
@@ -246,7 +290,6 @@ export function getCustomValidations(element, adapter, parentElement = null) {
|
|
|
246
290
|
results.push(validateInvalidFontPreload(element, adapter));
|
|
247
291
|
}
|
|
248
292
|
|
|
249
|
-
|
|
250
293
|
if (results.length === 0) {
|
|
251
294
|
return {};
|
|
252
295
|
}
|
|
@@ -256,6 +299,7 @@ export function getCustomValidations(element, adapter, parentElement = null) {
|
|
|
256
299
|
}
|
|
257
300
|
|
|
258
301
|
// Merge results
|
|
302
|
+
/** @type {CustomValidationResult} */
|
|
259
303
|
const combined = {
|
|
260
304
|
warnings: [],
|
|
261
305
|
payload: {},
|
|
@@ -263,7 +307,7 @@ export function getCustomValidations(element, adapter, parentElement = null) {
|
|
|
263
307
|
};
|
|
264
308
|
results.forEach(result => {
|
|
265
309
|
if (result.warnings) {
|
|
266
|
-
combined.warnings
|
|
310
|
+
combined.warnings?.push(...result.warnings);
|
|
267
311
|
}
|
|
268
312
|
if (result.payload) {
|
|
269
313
|
Object.assign(combined.payload, result.payload);
|
|
@@ -272,15 +316,21 @@ export function getCustomValidations(element, adapter, parentElement = null) {
|
|
|
272
316
|
return combined;
|
|
273
317
|
}
|
|
274
318
|
|
|
319
|
+
/**
|
|
320
|
+
* @param {any} element
|
|
321
|
+
* @param {AdapterInterface} adapter
|
|
322
|
+
* @returns {CustomValidationResult}
|
|
323
|
+
*/
|
|
275
324
|
function validateCSP(element, adapter) {
|
|
325
|
+
/** @type {string[]} */
|
|
276
326
|
const warnings = [];
|
|
327
|
+
/** @type {any} */
|
|
277
328
|
let payload = null;
|
|
278
329
|
|
|
279
330
|
const httpEquiv = adapter.getAttribute(element, 'http-equiv');
|
|
280
331
|
const httpEquivLower = httpEquiv?.toLowerCase();
|
|
281
332
|
|
|
282
333
|
if (httpEquivLower === 'content-security-policy-report-only') {
|
|
283
|
-
//https://w3c.github.io/webappsec-csp/#meta-element
|
|
284
334
|
warnings.push("CSP Report-Only is forbidden in meta tags");
|
|
285
335
|
return {
|
|
286
336
|
ruleId: 'no-meta-csp',
|
|
@@ -299,6 +349,7 @@ function validateCSP(element, adapter) {
|
|
|
299
349
|
return { warnings, payload };
|
|
300
350
|
}
|
|
301
351
|
|
|
352
|
+
/** @type {Record<string, string>} */
|
|
302
353
|
const directives = Object.fromEntries(
|
|
303
354
|
content.split(/\s*;\s*/).map((directive) => {
|
|
304
355
|
const [key, ...value] = directive.split(" ");
|
|
@@ -329,16 +380,27 @@ function validateCSP(element, adapter) {
|
|
|
329
380
|
};
|
|
330
381
|
}
|
|
331
382
|
|
|
383
|
+
/**
|
|
384
|
+
* @param {any} element
|
|
385
|
+
* @param {AdapterInterface} adapter
|
|
386
|
+
* @returns {boolean}
|
|
387
|
+
*/
|
|
332
388
|
function isInvalidOriginTrial(element, adapter) {
|
|
333
389
|
if (!isOriginTrial(element, adapter)) {
|
|
334
390
|
return false;
|
|
335
391
|
}
|
|
336
392
|
|
|
337
393
|
const { warnings } = validateOriginTrial(element, adapter);
|
|
338
|
-
return warnings
|
|
394
|
+
return (warnings?.length ?? 0) > 0;
|
|
339
395
|
}
|
|
340
396
|
|
|
397
|
+
/**
|
|
398
|
+
* @param {any} element
|
|
399
|
+
* @param {AdapterInterface} adapter
|
|
400
|
+
* @returns {CustomValidationResult}
|
|
401
|
+
*/
|
|
341
402
|
function validateOriginTrial(element, adapter) {
|
|
403
|
+
/** @type {CustomValidationResult} */
|
|
342
404
|
const metadata = {
|
|
343
405
|
ruleId: 'no-invalid-origin-trial',
|
|
344
406
|
payload: null,
|
|
@@ -349,25 +411,21 @@ function validateOriginTrial(element, adapter) {
|
|
|
349
411
|
try {
|
|
350
412
|
metadata.payload = decodeOriginTrialToken(token);
|
|
351
413
|
} catch {
|
|
352
|
-
metadata.warnings
|
|
414
|
+
metadata.warnings?.push("Invalid origin trial token: invalid token");
|
|
353
415
|
return metadata;
|
|
354
416
|
}
|
|
355
417
|
|
|
356
418
|
if (metadata.payload.expiry < new Date()) {
|
|
357
|
-
metadata.warnings
|
|
419
|
+
metadata.warnings?.push("Invalid origin trial token: expired");
|
|
358
420
|
}
|
|
359
421
|
|
|
360
|
-
// Origin validation only works in browser context with document.location
|
|
361
422
|
if (typeof document !== 'undefined' && document.location && document.location.href) {
|
|
362
423
|
if (!isSameOrigin(metadata.payload.origin, document.location.href)) {
|
|
363
424
|
const subdomain = isSubdomain(metadata.payload.origin, document.location.href);
|
|
364
|
-
// Cross-origin OTs are only valid if:
|
|
365
|
-
// 1. The document is a subdomain of the OT origin and the isSubdomain config is set
|
|
366
|
-
// 2. The isThirdParty config is set
|
|
367
425
|
if (subdomain && !metadata.payload.isSubdomain) {
|
|
368
|
-
metadata.warnings
|
|
426
|
+
metadata.warnings?.push("Invalid origin trial token: invalid subdomain");
|
|
369
427
|
} else if (!subdomain && !metadata.payload.isThirdParty) {
|
|
370
|
-
metadata.warnings
|
|
428
|
+
metadata.warnings?.push("Invalid origin trial token: invalid third-party origin");
|
|
371
429
|
}
|
|
372
430
|
}
|
|
373
431
|
}
|
|
@@ -375,8 +433,13 @@ function validateOriginTrial(element, adapter) {
|
|
|
375
433
|
return metadata;
|
|
376
434
|
}
|
|
377
435
|
|
|
378
|
-
|
|
436
|
+
/**
|
|
437
|
+
* Decode origin trial token payload
|
|
438
|
+
* @param {string|null} token
|
|
439
|
+
* @returns {any}
|
|
440
|
+
*/
|
|
379
441
|
function decodeOriginTrialToken(token) {
|
|
442
|
+
if (!token) throw new Error("Missing token");
|
|
380
443
|
const buffer = new Uint8Array([...atob(token)].map((a) => a.charCodeAt(0)));
|
|
381
444
|
const view = new DataView(buffer.buffer);
|
|
382
445
|
const length = view.getUint32(65, false);
|
|
@@ -385,82 +448,133 @@ function decodeOriginTrialToken(token) {
|
|
|
385
448
|
return payload;
|
|
386
449
|
}
|
|
387
450
|
|
|
451
|
+
/**
|
|
452
|
+
* @param {string} a
|
|
453
|
+
* @param {string} b
|
|
454
|
+
* @returns {boolean}
|
|
455
|
+
*/
|
|
388
456
|
function isSameOrigin(a, b) {
|
|
389
457
|
return new URL(a).origin === new URL(b).origin;
|
|
390
458
|
}
|
|
391
459
|
|
|
392
|
-
|
|
460
|
+
/**
|
|
461
|
+
* @param {string} a
|
|
462
|
+
* @param {string} b
|
|
463
|
+
* @returns {boolean}
|
|
464
|
+
*/
|
|
393
465
|
function isSubdomain(a, b) {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
return b.host.endsWith(`.${a.host}`);
|
|
466
|
+
const urlA = new URL(a);
|
|
467
|
+
const urlB = new URL(b);
|
|
468
|
+
return urlB.host.endsWith(`.${urlA.host}`);
|
|
398
469
|
}
|
|
399
470
|
|
|
471
|
+
/**
|
|
472
|
+
* @param {any} element
|
|
473
|
+
* @param {AdapterInterface} adapter
|
|
474
|
+
* @returns {boolean}
|
|
475
|
+
*/
|
|
400
476
|
function isDefaultStyle(element, adapter) {
|
|
401
477
|
if (adapter.getTagName(element) !== 'meta') return false;
|
|
402
478
|
const httpEquiv = adapter.getAttribute(element, 'http-equiv');
|
|
403
479
|
return httpEquiv?.toLowerCase() === 'default-style';
|
|
404
480
|
}
|
|
405
481
|
|
|
482
|
+
/**
|
|
483
|
+
* @param {any} element
|
|
484
|
+
* @param {AdapterInterface} adapter
|
|
485
|
+
* @returns {boolean}
|
|
486
|
+
*/
|
|
406
487
|
function isContentType(element, adapter) {
|
|
407
|
-
// Matches: meta[http-equiv="content-type" i], meta[charset]
|
|
408
488
|
if (adapter.getTagName(element) !== 'meta') return false;
|
|
409
489
|
if (adapter.hasAttribute(element, 'charset')) return true;
|
|
410
490
|
const httpEquiv = adapter.getAttribute(element, 'http-equiv');
|
|
411
491
|
return httpEquiv?.toLowerCase() === 'content-type';
|
|
412
492
|
}
|
|
413
493
|
|
|
494
|
+
/**
|
|
495
|
+
* @param {any} element
|
|
496
|
+
* @param {AdapterInterface} adapter
|
|
497
|
+
* @returns {boolean}
|
|
498
|
+
*/
|
|
414
499
|
function isHttpEquiv(element, adapter) {
|
|
415
|
-
// Matches: meta[http-equiv]
|
|
416
500
|
if (adapter.getTagName(element) !== 'meta') return false;
|
|
417
501
|
return adapter.hasAttribute(element, 'http-equiv');
|
|
418
502
|
}
|
|
419
503
|
|
|
504
|
+
/**
|
|
505
|
+
* @param {any} element
|
|
506
|
+
* @param {AdapterInterface} adapter
|
|
507
|
+
* @returns {boolean}
|
|
508
|
+
*/
|
|
420
509
|
function isMetaViewport(element, adapter) {
|
|
421
510
|
if (adapter.getTagName(element) !== 'meta') return false;
|
|
422
511
|
const name = adapter.getAttribute(element, 'name');
|
|
423
512
|
return name?.toLowerCase() === 'viewport';
|
|
424
513
|
}
|
|
425
514
|
|
|
515
|
+
/**
|
|
516
|
+
* @param {any} element
|
|
517
|
+
* @param {AdapterInterface} adapter
|
|
518
|
+
* @returns {boolean}
|
|
519
|
+
*/
|
|
426
520
|
function isInvalidDefaultStyle(element, adapter) {
|
|
427
521
|
if (!isDefaultStyle(element, adapter)) {
|
|
428
522
|
return false;
|
|
429
523
|
}
|
|
430
524
|
|
|
431
525
|
const { warnings } = validateDefaultStyle(element, adapter);
|
|
432
|
-
return warnings
|
|
526
|
+
return (warnings?.length ?? 0) > 0;
|
|
433
527
|
}
|
|
434
528
|
|
|
529
|
+
/**
|
|
530
|
+
* @param {any} element
|
|
531
|
+
* @param {AdapterInterface} adapter
|
|
532
|
+
* @returns {boolean}
|
|
533
|
+
*/
|
|
435
534
|
function isInvalidContentType(element, adapter) {
|
|
436
535
|
if (!isContentType(element, adapter)) {
|
|
437
536
|
return false;
|
|
438
537
|
}
|
|
439
538
|
|
|
440
539
|
const { warnings } = validateContentType(element, adapter);
|
|
441
|
-
return warnings
|
|
540
|
+
return (warnings?.length ?? 0) > 0;
|
|
442
541
|
}
|
|
443
542
|
|
|
543
|
+
/**
|
|
544
|
+
* @param {any} element
|
|
545
|
+
* @param {AdapterInterface} adapter
|
|
546
|
+
* @returns {boolean}
|
|
547
|
+
*/
|
|
444
548
|
function isInvalidHttpEquiv(element, adapter) {
|
|
445
549
|
if (!isHttpEquiv(element, adapter)) {
|
|
446
550
|
return false;
|
|
447
551
|
}
|
|
448
552
|
|
|
449
553
|
const { warnings } = validateHttpEquiv(element, adapter);
|
|
450
|
-
return warnings
|
|
554
|
+
return (warnings?.length ?? 0) > 0;
|
|
451
555
|
}
|
|
452
556
|
|
|
557
|
+
/**
|
|
558
|
+
* @param {any} element
|
|
559
|
+
* @param {AdapterInterface} adapter
|
|
560
|
+
* @returns {boolean}
|
|
561
|
+
*/
|
|
453
562
|
function isInvalidMetaViewport(element, adapter) {
|
|
454
563
|
if (!isMetaViewport(element, adapter)) {
|
|
455
564
|
return false;
|
|
456
565
|
}
|
|
457
566
|
|
|
458
567
|
const { warnings } = validateMetaViewport(element, adapter);
|
|
459
|
-
return warnings
|
|
568
|
+
return (warnings?.length ?? 0) > 0;
|
|
460
569
|
}
|
|
461
570
|
|
|
571
|
+
/**
|
|
572
|
+
* @param {any} element
|
|
573
|
+
* @param {AdapterInterface} adapter
|
|
574
|
+
* @param {any} [parentElement=null]
|
|
575
|
+
* @returns {boolean}
|
|
576
|
+
*/
|
|
462
577
|
function isUnnecessaryPreload(element, adapter, parentElement = null) {
|
|
463
|
-
// Matches: link:is([rel="preload" i], [rel="modulepreload" i])
|
|
464
578
|
const tagName = adapter.getTagName(element);
|
|
465
579
|
if (tagName !== 'link') {
|
|
466
580
|
return false;
|
|
@@ -482,6 +596,11 @@ function isUnnecessaryPreload(element, adapter, parentElement = null) {
|
|
|
482
596
|
return found != null;
|
|
483
597
|
}
|
|
484
598
|
|
|
599
|
+
/**
|
|
600
|
+
* @param {any} element
|
|
601
|
+
* @param {AdapterInterface} adapter
|
|
602
|
+
* @returns {boolean}
|
|
603
|
+
*/
|
|
485
604
|
function isInvalidFontPreload(element, adapter) {
|
|
486
605
|
const tagName = adapter.getTagName(element);
|
|
487
606
|
if (tagName !== 'link') {
|
|
@@ -495,11 +614,14 @@ function isInvalidFontPreload(element, adapter) {
|
|
|
495
614
|
if (as?.toLowerCase() !== 'font') {
|
|
496
615
|
return false;
|
|
497
616
|
}
|
|
498
|
-
// crossorigin must be present (even if empty, which means anonymous)
|
|
499
617
|
return !adapter.hasAttribute(element, 'crossorigin');
|
|
500
618
|
}
|
|
501
619
|
|
|
502
|
-
|
|
620
|
+
/**
|
|
621
|
+
* @param {any} element
|
|
622
|
+
* @param {AdapterInterface} adapter
|
|
623
|
+
* @returns {CustomValidationResult}
|
|
624
|
+
*/
|
|
503
625
|
function validateInvalidFontPreload(element, adapter) {
|
|
504
626
|
const warnings = ["Font preloads must have the crossorigin attribute set, even for same-origin fonts."];
|
|
505
627
|
return {
|
|
@@ -510,29 +632,27 @@ function validateInvalidFontPreload(element, adapter) {
|
|
|
510
632
|
}
|
|
511
633
|
|
|
512
634
|
/**
|
|
513
|
-
* Find an element with matching source using adapter
|
|
514
|
-
* @param {
|
|
635
|
+
* Find an element with matching source using adapter
|
|
636
|
+
* @param {any} parent - Parent element to search within
|
|
515
637
|
* @param {string} sourceUrl - URL to match
|
|
516
|
-
* @param {
|
|
517
|
-
* @param {
|
|
518
|
-
* @returns {
|
|
638
|
+
* @param {any} excludeElement - Element to exclude from search
|
|
639
|
+
* @param {AdapterInterface} adapter - Adapter instance
|
|
640
|
+
* @returns {any|null} - Matching element or null
|
|
519
641
|
*/
|
|
520
642
|
function findElementWithSource(parent, sourceUrl, excludeElement, adapter) {
|
|
521
643
|
const children = adapter.getChildren(parent);
|
|
522
644
|
|
|
523
645
|
for (const child of children) {
|
|
524
|
-
// Skip the preload element itself
|
|
525
646
|
if (child === excludeElement) {
|
|
526
647
|
continue;
|
|
527
648
|
}
|
|
528
649
|
|
|
529
650
|
const tagName = adapter.getTagName(child);
|
|
530
651
|
|
|
531
|
-
// Check link elements (but not preload/modulepreload)
|
|
532
652
|
if (tagName === 'link') {
|
|
533
653
|
const rel = adapter.getAttribute(child, 'rel');
|
|
534
654
|
if (rel && /\b(preload|modulepreload)\b/i.test(rel)) {
|
|
535
|
-
continue;
|
|
655
|
+
continue;
|
|
536
656
|
}
|
|
537
657
|
|
|
538
658
|
const childHref = adapter.getAttribute(child, 'href');
|
|
@@ -541,7 +661,6 @@ function findElementWithSource(parent, sourceUrl, excludeElement, adapter) {
|
|
|
541
661
|
}
|
|
542
662
|
}
|
|
543
663
|
|
|
544
|
-
// Check script elements
|
|
545
664
|
if (tagName === 'script') {
|
|
546
665
|
const src = adapter.getAttribute(child, 'src');
|
|
547
666
|
if (src === sourceUrl) {
|
|
@@ -553,23 +672,19 @@ function findElementWithSource(parent, sourceUrl, excludeElement, adapter) {
|
|
|
553
672
|
return null;
|
|
554
673
|
}
|
|
555
674
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
}
|
|
562
|
-
return new URL(href, document.baseURI).href;
|
|
563
|
-
}
|
|
564
|
-
|
|
675
|
+
/**
|
|
676
|
+
* @param {any} element
|
|
677
|
+
* @param {AdapterInterface} adapter
|
|
678
|
+
* @returns {CustomValidationResult}
|
|
679
|
+
*/
|
|
565
680
|
function validateDefaultStyle(element, adapter) {
|
|
681
|
+
/** @type {string[]} */
|
|
566
682
|
const warnings = [];
|
|
683
|
+
/** @type {any} */
|
|
567
684
|
let payload = null;
|
|
568
685
|
|
|
569
|
-
// Check if the value points to an alternate stylesheet with that title
|
|
570
686
|
const title = adapter.getAttribute(element, "content");
|
|
571
687
|
|
|
572
|
-
// Browser-only validation
|
|
573
688
|
if (element.parentElement && element.parentElement.querySelector) {
|
|
574
689
|
const stylesheet = element.parentElement.querySelector(
|
|
575
690
|
`link[rel~="alternate" i][rel~="stylesheet" i][title="${title}"]`
|
|
@@ -586,7 +701,6 @@ function validateDefaultStyle(element, adapter) {
|
|
|
586
701
|
warnings.push(`This has no effect. No alternate stylesheet found having title="${title}".`);
|
|
587
702
|
}
|
|
588
703
|
} else if (!title) {
|
|
589
|
-
// In non-browser context, we can still check for missing title
|
|
590
704
|
warnings.push("This has no effect. The content attribute must be set to a valid stylesheet title.");
|
|
591
705
|
}
|
|
592
706
|
|
|
@@ -597,23 +711,25 @@ function validateDefaultStyle(element, adapter) {
|
|
|
597
711
|
return { ruleId: 'no-default-style', warnings, payload };
|
|
598
712
|
}
|
|
599
713
|
|
|
714
|
+
/**
|
|
715
|
+
* @param {any} element
|
|
716
|
+
* @param {AdapterInterface} adapter
|
|
717
|
+
* @returns {CustomValidationResult}
|
|
718
|
+
*/
|
|
600
719
|
function validateContentType(element, adapter) {
|
|
720
|
+
/** @type {string[]} */
|
|
601
721
|
const warnings = [];
|
|
722
|
+
/** @type {any} */
|
|
602
723
|
let payload = null;
|
|
603
|
-
// https://html.spec.whatwg.org/multipage/semantics.html#character-encoding-declaration
|
|
604
|
-
// Check if there exists both meta[http-equiv] and meta[chartset] variations
|
|
605
724
|
|
|
606
|
-
// Check if this is a charset or content-type meta
|
|
607
725
|
const isCharset = adapter.hasAttribute(element, 'charset');
|
|
608
726
|
const httpEquiv = adapter.getAttribute(element, 'http-equiv');
|
|
609
727
|
const isContentTypeMeta = httpEquiv?.toLowerCase() === 'content-type';
|
|
610
728
|
|
|
611
729
|
if (isCharset || isContentTypeMeta) {
|
|
612
|
-
// Check for duplicate charset declarations among siblings
|
|
613
730
|
const siblings = adapter.getSiblings(element);
|
|
614
731
|
const hasDuplicateCharset = siblings.some(sibling => {
|
|
615
732
|
if (adapter.getTagName(sibling) !== 'meta') return false;
|
|
616
|
-
// Check if sibling is also a charset declaration
|
|
617
733
|
if (adapter.hasAttribute(sibling, 'charset')) return true;
|
|
618
734
|
const siblingHttpEquiv = adapter.getAttribute(sibling, 'http-equiv');
|
|
619
735
|
return siblingHttpEquiv?.toLowerCase() === 'content-type';
|
|
@@ -622,14 +738,13 @@ function validateContentType(element, adapter) {
|
|
|
622
738
|
if (hasDuplicateCharset) {
|
|
623
739
|
const parent = adapter.getParent(element);
|
|
624
740
|
if (parent) {
|
|
625
|
-
const charsetElements = adapter.getChildren(parent).filter(child => {
|
|
741
|
+
const charsetElements = adapter.getChildren(parent).filter((/** @type {any} */ child) => {
|
|
626
742
|
if (adapter.getTagName(child) !== 'meta') return false;
|
|
627
743
|
if (adapter.hasAttribute(child, 'charset')) return true;
|
|
628
744
|
const childHttpEquiv = adapter.getAttribute(child, 'http-equiv');
|
|
629
745
|
return childHttpEquiv?.toLowerCase() === 'content-type';
|
|
630
746
|
});
|
|
631
|
-
|
|
632
|
-
const encodingDeclaration = charsetElements.find(el => el !== element);
|
|
747
|
+
const encodingDeclaration = charsetElements.find((/** @type {any} */ el) => el !== element);
|
|
633
748
|
if (encodingDeclaration) {
|
|
634
749
|
payload = payload ?? {};
|
|
635
750
|
payload.encodingDeclaration = encodingDeclaration;
|
|
@@ -641,8 +756,6 @@ function validateContentType(element, adapter) {
|
|
|
641
756
|
}
|
|
642
757
|
}
|
|
643
758
|
|
|
644
|
-
// Check if it completely exists in the first 1024 bytes
|
|
645
|
-
// This check only works in browser context with ownerDocument
|
|
646
759
|
if (element.ownerDocument?.documentElement?.outerHTML && element.outerHTML) {
|
|
647
760
|
const charPos = element.ownerDocument.documentElement.outerHTML.indexOf(element.outerHTML) + element.outerHTML.length;
|
|
648
761
|
if (charPos > 1024) {
|
|
@@ -654,7 +767,6 @@ function validateContentType(element, adapter) {
|
|
|
654
767
|
}
|
|
655
768
|
}
|
|
656
769
|
|
|
657
|
-
// Check that the character encoding is UTF-8
|
|
658
770
|
let charset = null;
|
|
659
771
|
if (isCharset) {
|
|
660
772
|
charset = adapter.getAttribute(element, "charset");
|
|
@@ -670,7 +782,6 @@ function validateContentType(element, adapter) {
|
|
|
670
782
|
}
|
|
671
783
|
|
|
672
784
|
if (warnings.length) {
|
|
673
|
-
// Append the spec source to the last warning
|
|
674
785
|
warnings[warnings.length - 1] +=
|
|
675
786
|
"\nLearn more: https://html.spec.whatwg.org/multipage/semantics.html#character-encoding-declaration";
|
|
676
787
|
}
|
|
@@ -678,9 +789,15 @@ function validateContentType(element, adapter) {
|
|
|
678
789
|
return { ruleId: 'valid-charset', warnings, payload };
|
|
679
790
|
}
|
|
680
791
|
|
|
792
|
+
/**
|
|
793
|
+
* @param {any} element
|
|
794
|
+
* @param {AdapterInterface} adapter
|
|
795
|
+
* @returns {CustomValidationResult}
|
|
796
|
+
*/
|
|
681
797
|
function validateHttpEquiv(element, adapter) {
|
|
798
|
+
/** @type {string[]} */
|
|
682
799
|
const warnings = [];
|
|
683
|
-
const type = adapter.getAttribute(element, "http-equiv")
|
|
800
|
+
const type = adapter.getAttribute(element, "http-equiv")?.toLowerCase() || '';
|
|
684
801
|
const content = adapter.getAttribute(element, "content")?.toLowerCase();
|
|
685
802
|
|
|
686
803
|
switch (type) {
|
|
@@ -689,7 +806,6 @@ function validateHttpEquiv(element, adapter) {
|
|
|
689
806
|
case "origin-trial":
|
|
690
807
|
case "content-type":
|
|
691
808
|
case "default-style":
|
|
692
|
-
// Legitimate use case and/or more specific validation already exists
|
|
693
809
|
break;
|
|
694
810
|
|
|
695
811
|
case "refresh":
|
|
@@ -797,12 +913,17 @@ function validateHttpEquiv(element, adapter) {
|
|
|
797
913
|
};
|
|
798
914
|
}
|
|
799
915
|
|
|
916
|
+
/**
|
|
917
|
+
* @param {any} element
|
|
918
|
+
* @param {AdapterInterface} adapter
|
|
919
|
+
* @returns {CustomValidationResult}
|
|
920
|
+
*/
|
|
800
921
|
function validateMetaViewport(element, adapter) {
|
|
922
|
+
/** @type {string[]} */
|
|
801
923
|
const warnings = [];
|
|
924
|
+
/** @type {any} */
|
|
802
925
|
let payload = null;
|
|
803
926
|
|
|
804
|
-
// Redundant meta viewport validation.
|
|
805
|
-
// Check if there are other viewport meta elements among siblings
|
|
806
927
|
const siblings = adapter.getSiblings(element);
|
|
807
928
|
const hasDuplicateViewport = siblings.some(sibling => {
|
|
808
929
|
if (adapter.getTagName(sibling) !== 'meta') return false;
|
|
@@ -813,13 +934,12 @@ function validateMetaViewport(element, adapter) {
|
|
|
813
934
|
if (hasDuplicateViewport) {
|
|
814
935
|
const parent = adapter.getParent(element);
|
|
815
936
|
if (parent) {
|
|
816
|
-
const viewportElements = adapter.getChildren(parent).filter(child => {
|
|
937
|
+
const viewportElements = adapter.getChildren(parent).filter((/** @type {any} */ child) => {
|
|
817
938
|
if (adapter.getTagName(child) !== 'meta') return false;
|
|
818
939
|
const name = adapter.getAttribute(child, 'name');
|
|
819
940
|
return name?.toLowerCase() === 'viewport';
|
|
820
941
|
});
|
|
821
|
-
|
|
822
|
-
const firstMetaViewport = viewportElements.find(el => el !== element);
|
|
942
|
+
const firstMetaViewport = viewportElements.find((/** @type {any} */ el) => el !== element);
|
|
823
943
|
if (firstMetaViewport) {
|
|
824
944
|
payload = { firstMetaViewport };
|
|
825
945
|
warnings.push(
|
|
@@ -830,13 +950,13 @@ function validateMetaViewport(element, adapter) {
|
|
|
830
950
|
}
|
|
831
951
|
}
|
|
832
952
|
|
|
833
|
-
// Additional validation performed only on the first meta viewport.
|
|
834
953
|
const content = adapter.getAttribute(element, "content")?.toLowerCase();
|
|
835
954
|
if (!content) {
|
|
836
955
|
warnings.push("Invalid viewport. The content attribute must be set.");
|
|
837
956
|
return { warnings, payload };
|
|
838
957
|
}
|
|
839
958
|
|
|
959
|
+
/** @type {Record<string, string>} */
|
|
840
960
|
const directives = Object.fromEntries(
|
|
841
961
|
content.split(",").map((directive) => {
|
|
842
962
|
const [key, value] = directive.split("=");
|
|
@@ -891,7 +1011,9 @@ function validateMetaViewport(element, adapter) {
|
|
|
891
1011
|
warnings.push(`Invalid maximum zoom level "${maxScale}". Values must be between 0.1 and 10.`);
|
|
892
1012
|
}
|
|
893
1013
|
if (maxScale < 2) {
|
|
894
|
-
warnings.push(
|
|
1014
|
+
warnings.push(
|
|
1015
|
+
`Disabling zoom levels under 2x can cause accessibility issues. Found "maximum-scale=${directives["maximum-scale"]}".`
|
|
1016
|
+
);
|
|
895
1017
|
}
|
|
896
1018
|
}
|
|
897
1019
|
|
|
@@ -899,7 +1021,7 @@ function validateMetaViewport(element, adapter) {
|
|
|
899
1021
|
const userScalable = directives["user-scalable"];
|
|
900
1022
|
if (userScalable == "no" || userScalable == "0") {
|
|
901
1023
|
warnings.push(
|
|
902
|
-
`Disabling zooming can cause accessibility issues to users with visual impairments. Found "
|
|
1024
|
+
`Disabling zooming can cause accessibility issues to users with visual impairments. Found "user-scalable=${userScalable}".`
|
|
903
1025
|
);
|
|
904
1026
|
}
|
|
905
1027
|
if (!["0", "1", "yes", "no"].includes(userScalable)) {
|
|
@@ -942,16 +1064,13 @@ function validateMetaViewport(element, adapter) {
|
|
|
942
1064
|
Object.keys(directives)
|
|
943
1065
|
.filter((directive) => {
|
|
944
1066
|
if (validDirectives.has(directive)) {
|
|
945
|
-
// The directive is valid.
|
|
946
1067
|
return false;
|
|
947
1068
|
}
|
|
948
1069
|
if (directive == "shrink-to-fit") {
|
|
949
|
-
// shrink-to-fit is not valid, but we have a separate warning for it.
|
|
950
1070
|
return false;
|
|
951
1071
|
}
|
|
952
1072
|
if (directive == "viewport-fit") {
|
|
953
|
-
|
|
954
|
-
// https://github.com/rviscomi/capo.js/issues/110
|
|
1073
|
+
return false;
|
|
955
1074
|
}
|
|
956
1075
|
return true;
|
|
957
1076
|
})
|
|
@@ -962,6 +1081,12 @@ function validateMetaViewport(element, adapter) {
|
|
|
962
1081
|
return { ruleId: 'valid-meta-viewport', warnings, payload };
|
|
963
1082
|
}
|
|
964
1083
|
|
|
1084
|
+
/**
|
|
1085
|
+
* @param {any} element
|
|
1086
|
+
* @param {AdapterInterface} adapter
|
|
1087
|
+
* @param {any} [parentElement=null]
|
|
1088
|
+
* @returns {CustomValidationResult}
|
|
1089
|
+
*/
|
|
965
1090
|
function validateUnnecessaryPreload(element, adapter, parentElement = null) {
|
|
966
1091
|
const href = adapter.getAttribute(element, "href");
|
|
967
1092
|
if (!href) {
|