@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,273 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Custom Adapters
|
|
3
|
-
description: Learn how to create and test custom adapters for capo.js.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import { Tabs, TabItem } from '@astrojs/starlight/components';
|
|
7
|
-
|
|
8
|
-
This guide explains how to create custom adapters for capo.js and validate them using the built-in test utilities.
|
|
9
|
-
|
|
10
|
-
## Why custom adapters?
|
|
11
|
-
|
|
12
|
-
Custom adapters allow you to use capo.js with different HTML parsers or AST formats, such as:
|
|
13
|
-
- JSX/React elements
|
|
14
|
-
- Vue template AST
|
|
15
|
-
- Svelte component AST
|
|
16
|
-
- Custom XML parsers
|
|
17
|
-
- Server-side rendering frameworks
|
|
18
|
-
|
|
19
|
-
## Creating a custom adapter
|
|
20
|
-
|
|
21
|
-
### Step 1: Extend the AdapterInterface
|
|
22
|
-
|
|
23
|
-
```javascript
|
|
24
|
-
import { AdapterInterface } from '@rviscomi/capo.js/adapters';
|
|
25
|
-
|
|
26
|
-
export class MyCustomAdapter extends AdapterInterface {
|
|
27
|
-
// Implement all 11 required methods
|
|
28
|
-
|
|
29
|
-
isElement(node) {
|
|
30
|
-
return node && node.type === 'YourElementType';
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
getTagName(node) {
|
|
34
|
-
return node.tagName?.toLowerCase() || '';
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
getAttribute(node, name) {
|
|
38
|
-
// ...
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Implement other required methods:
|
|
42
|
-
// hasAttribute, getAttributeNames, getTextContent,
|
|
43
|
-
// getChildren, getParent, getSiblings, stringify
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Step 2: Use your adapter
|
|
48
|
-
|
|
49
|
-
```javascript
|
|
50
|
-
import { MyCustomAdapter } from './my-custom-adapter.js';
|
|
51
|
-
import { analyzeHead } from '@rviscomi/capo.js';
|
|
52
|
-
|
|
53
|
-
const adapter = new MyCustomAdapter();
|
|
54
|
-
const results = analyzeHead(headNode, adapter);
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Node.js usage
|
|
58
|
-
|
|
59
|
-
While capo.js is designed for the browser, you can use it in Node.js by pairing it with a DOM simulation library like [jsdom](https://github.com/jsdom/jsdom).
|
|
60
|
-
|
|
61
|
-
Since jsdom provides a standard DOM API, you can reuse the built-in `BrowserAdapter` instead of writing a custom one:
|
|
62
|
-
|
|
63
|
-
```javascript
|
|
64
|
-
import { JSDOM } from 'jsdom';
|
|
65
|
-
import { analyzeHead, BrowserAdapter } from '@rviscomi/capo.js';
|
|
66
|
-
|
|
67
|
-
const html = `
|
|
68
|
-
<!DOCTYPE html>
|
|
69
|
-
<html>
|
|
70
|
-
<head>
|
|
71
|
-
<title>My Page</title>
|
|
72
|
-
<meta charset="utf-8">
|
|
73
|
-
</head>
|
|
74
|
-
<body></body>
|
|
75
|
-
</html>
|
|
76
|
-
`;
|
|
77
|
-
|
|
78
|
-
// 1. Create a JSDOM instance
|
|
79
|
-
const dom = new JSDOM(html);
|
|
80
|
-
const head = dom.window.document.querySelector('head');
|
|
81
|
-
|
|
82
|
-
// 2. Use the built-in BrowserAdapter
|
|
83
|
-
const adapter = new BrowserAdapter();
|
|
84
|
-
|
|
85
|
-
// 3. Analyze
|
|
86
|
-
const results = analyzeHead(head, adapter);
|
|
87
|
-
|
|
88
|
-
console.log(results.weights);
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Validating your adapter
|
|
92
|
-
|
|
93
|
-
capo.js provides **three levels of validation** for custom adapters:
|
|
94
|
-
|
|
95
|
-
The simplest validation is to ensure your adapter implements the required interface:
|
|
96
|
-
|
|
97
|
-
```javascript
|
|
98
|
-
import { validateAdapter } from '@rviscomi/capo.js/adapters';
|
|
99
|
-
import { MyCustomAdapter } from './my-custom-adapter.js';
|
|
100
|
-
|
|
101
|
-
const adapter = new MyCustomAdapter();
|
|
102
|
-
validateAdapter(adapter); // Throws if invalid
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**What it checks:**
|
|
106
|
-
- Adapter class is a valid constructor
|
|
107
|
-
- Adapter can be instantiated
|
|
108
|
-
- All 11 required methods are implemented
|
|
109
|
-
|
|
110
|
-
**When to use:** Quick validation during development.
|
|
111
|
-
|
|
112
|
-
### Level 2: Programmatic validation
|
|
113
|
-
|
|
114
|
-
Use the `validateAdapter()` function for explicit validation:
|
|
115
|
-
|
|
116
|
-
```javascript
|
|
117
|
-
import { validateAdapter } from '@rviscomi/capo.js/adapters';
|
|
118
|
-
import { MyCustomAdapter } from './my-custom-adapter.js';
|
|
119
|
-
|
|
120
|
-
const adapter = new MyCustomAdapter();
|
|
121
|
-
|
|
122
|
-
try {
|
|
123
|
-
validateAdapter(adapter);
|
|
124
|
-
console.log('✅ Adapter is valid!');
|
|
125
|
-
} catch (error) {
|
|
126
|
-
console.error('❌ Adapter validation failed:', error.message);
|
|
127
|
-
}
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
**What it checks:**
|
|
131
|
-
- All 11 required methods exist
|
|
132
|
-
- Each method is a function
|
|
133
|
-
|
|
134
|
-
**When to use:** Integration tests, CI/CD pipelines.
|
|
135
|
-
|
|
136
|
-
### Level 3: Full test suite
|
|
137
|
-
|
|
138
|
-
Run the comprehensive test suite to validate behavior:
|
|
139
|
-
|
|
140
|
-
```javascript
|
|
141
|
-
import { describe } from 'node:test';
|
|
142
|
-
import { runAdapterTestSuite, testAdapterCompliance } from '@rviscomi/capo.js/adapters/test-suite';
|
|
143
|
-
import { MyCustomAdapter } from './my-custom-adapter.js';
|
|
144
|
-
import { parseHtml } from './my-parser.js'; // Your parser
|
|
145
|
-
|
|
146
|
-
describe('MyCustomAdapter', () => {
|
|
147
|
-
// Full test suite - tests all methods with edge cases
|
|
148
|
-
runAdapterTestSuite(MyCustomAdapter, {
|
|
149
|
-
createElement: (htmlString) => {
|
|
150
|
-
// Your logic to create a node from HTML
|
|
151
|
-
return parseHtml(htmlString);
|
|
152
|
-
},
|
|
153
|
-
supportsLocation: true // true if getLocation() works
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
// OR: Quick compliance check only
|
|
157
|
-
testAdapterCompliance(MyCustomAdapter);
|
|
158
|
-
});
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Note on parent pointers
|
|
162
|
-
|
|
163
|
-
Some adapters, like those for ESLint, require parent pointers on nodes to support `getParent()` and `getSiblings()`. If your parser doesn't provide these pointers by default (like `@html-eslint/parser`), you must shim them in your test setup.
|
|
164
|
-
|
|
165
|
-
For ESLint adapters, it's recommended to use ESLint's `RuleTester` in your tests to provide a realistic environment where parent pointers are automatically injected:
|
|
166
|
-
|
|
167
|
-
```javascript
|
|
168
|
-
import { RuleTester } from 'eslint';
|
|
169
|
-
import * as htmlParser from 'your-html-parser'; // e.g., @html-eslint/parser
|
|
170
|
-
|
|
171
|
-
const ruleTester = new RuleTester({
|
|
172
|
-
languageOptions: { parser: htmlParser }
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
runAdapterTestSuite(MyAdapter, {
|
|
176
|
-
createElement: (html) => {
|
|
177
|
-
let capturedNode = null;
|
|
178
|
-
ruleTester.run('capture', {
|
|
179
|
-
create: () => ({
|
|
180
|
-
Tag: (node) => { if (!capturedNode) capturedNode = node; }
|
|
181
|
-
})
|
|
182
|
-
}, {
|
|
183
|
-
valid: [html]
|
|
184
|
-
});
|
|
185
|
-
return capturedNode;
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
**What it tests:**
|
|
191
|
-
- All 11 methods with various inputs
|
|
192
|
-
- Edge cases (null, undefined, empty strings)
|
|
193
|
-
- Expected return types
|
|
194
|
-
- Case-insensitivity
|
|
195
|
-
- 39 individual test cases
|
|
196
|
-
|
|
197
|
-
**When to use:** Comprehensive validation before release.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
## Best practices
|
|
201
|
-
|
|
202
|
-
1. **Extend `AdapterInterface`** to get base implementation.
|
|
203
|
-
2. **Handle null/undefined** inputs in all methods.
|
|
204
|
-
3. **Expect lowercase attribute names** as inputs.
|
|
205
|
-
4. **Shim parent pointers** if needed for `getParent`/`getSiblings`.
|
|
206
|
-
5. **Run the test suite** to verify compliance.
|
|
207
|
-
|
|
208
|
-
## API reference
|
|
209
|
-
|
|
210
|
-
### runAdapterTestSuite(AdapterClass, options)
|
|
211
|
-
|
|
212
|
-
Runs comprehensive tests on a custom adapter.
|
|
213
|
-
|
|
214
|
-
**Parameters:**
|
|
215
|
-
- `AdapterClass` (Function) - The adapter constructor to test
|
|
216
|
-
- `options` (Object)
|
|
217
|
-
- `createElement` (Function) - Function that creates test nodes from HTML strings
|
|
218
|
-
- `supportsLocation` (boolean, optional) - Whether adapter supports `getLocation()`. Default: `false`
|
|
219
|
-
|
|
220
|
-
**Example:**
|
|
221
|
-
```javascript
|
|
222
|
-
runAdapterTestSuite(MyAdapter, {
|
|
223
|
-
createElement: (html) => parseHtml(html),
|
|
224
|
-
supportsLocation: true
|
|
225
|
-
});
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
### testAdapterCompliance(AdapterClass)
|
|
229
|
-
|
|
230
|
-
Quick compliance check that verifies all required methods exist.
|
|
231
|
-
|
|
232
|
-
**Parameters:**
|
|
233
|
-
- `AdapterClass` (Function) - The adapter constructor to test
|
|
234
|
-
|
|
235
|
-
**Example:**
|
|
236
|
-
```javascript
|
|
237
|
-
testAdapterCompliance(MyAdapter);
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### validateAdapter(adapter)
|
|
241
|
-
|
|
242
|
-
Programmatically validates an adapter instance.
|
|
243
|
-
|
|
244
|
-
**Parameters:**
|
|
245
|
-
- `adapter` (Object) - Adapter instance to validate
|
|
246
|
-
|
|
247
|
-
**Throws:** Error if validation fails
|
|
248
|
-
|
|
249
|
-
**Example:**
|
|
250
|
-
```javascript
|
|
251
|
-
const adapter = new MyAdapter();
|
|
252
|
-
validateAdapter(adapter); // throws if invalid
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
## Troubleshooting
|
|
256
|
-
|
|
257
|
-
**"Adapter missing required method: X"**
|
|
258
|
-
- Ensure your adapter implements all 11 required methods
|
|
259
|
-
- Check for typos in method names
|
|
260
|
-
- Verify methods are functions, not properties
|
|
261
|
-
|
|
262
|
-
**"Cannot detect adapter for node"**
|
|
263
|
-
- Capo.js no longer uses auto-detection. You must explicitly provide the adapter instance to analysis functions.
|
|
264
|
-
|
|
265
|
-
**Tests failing with "createElement is required"**
|
|
266
|
-
- You must provide a `createElement` function in test options
|
|
267
|
-
- This function should convert HTML strings to your parser's node format
|
|
268
|
-
|
|
269
|
-
## Support
|
|
270
|
-
|
|
271
|
-
For questions or issues with custom adapters:
|
|
272
|
-
- [GitHub Issues](https://github.com/rviscomi/capo.js/issues)
|
|
273
|
-
- [Discussions](https://github.com/rviscomi/capo.js/discussions)
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "capo.js: get your ﹤𝚑𝚎𝚊𝚍﹥ in order"
|
|
3
|
-
description: Getting starting with capo.js
|
|
4
|
-
hero:
|
|
5
|
-
title: capo.js
|
|
6
|
-
tagline: Get your <code><head></code> in order
|
|
7
|
-
image:
|
|
8
|
-
file: ../../assets/capo256.png
|
|
9
|
-
actions:
|
|
10
|
-
- text: Try it live
|
|
11
|
-
link: /capo.js/user/demo/
|
|
12
|
-
icon: rocket
|
|
13
|
-
variant: primary
|
|
14
|
-
- text: Browse the source
|
|
15
|
-
link: https://github.com/rviscomi/capo.js
|
|
16
|
-
icon: external
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
import { Card, CardGrid } from '@astrojs/starlight/components';
|
|
20
|
-
|
|
21
|
-
:::tip[Inspiration]
|
|
22
|
-
This tool was built by [Rick Viscomi](https://twitter.com/rick_viscomi) and directly inspired by [Harry Roberts](https://twitter.com/csswizardry)' work on [ct.css](https://csswizardry.com/ct/) and [Vitaly Friedman](https://twitter.com/vitalyf)'s [2022 presentation](https://youtu.be/uqLl-Yew2o8?t=2873) at Nordic.js.
|
|
23
|
-
:::
|
|
24
|
-
|
|
25
|
-
## Why it matters
|
|
26
|
-
|
|
27
|
-
How you order elements in the `<head>` can have an effect on the (perceived) performance of the page.
|
|
28
|
-
|
|
29
|
-
Capo helps you identify which elements are out of order.
|
|
30
|
-
|
|
31
|
-
## How to use it
|
|
32
|
-
|
|
33
|
-
1. Install the [Capo Chrome extension](https://chromewebstore.google.com/detail/capo-get-your-%3Chead%3E-in-o/ohabpnaccigjhkkebjofhpmebofgpbeb)
|
|
34
|
-
|
|
35
|
-
OR:
|
|
36
|
-
|
|
37
|
-
1. Install the [Chrome extension](https://chromewebstore.google.com/detail/capo-get-your-%3Chead%3E-in-o/ohabpnaccigjhkkebjofhpmebofgpbeb)
|
|
38
|
-
3. Explore the console logs
|
|
39
|
-
|
|
40
|
-

|
|
41
|
-
|
|
42
|
-
For applications that add lots of dynamic content to the `<head>` on the client, it'd be more accurate to look at the server-rendered `<head>` instead.
|
|
43
|
-
|
|
44
|
-
### Chrome extension
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-

|
|
48
|
-
|
|
49
|
-
WIP see the [extension](/capo.js/user/extension/) guide.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
### Other
|
|
53
|
-
|
|
54
|
-
Alternatively, you can use local overrides in DevTools to manually inject the capo.js script into the document so that it runs before anything else, eg the first child of `<body>`. Harry Roberts also has a nifty [video](https://www.youtube.com/watch?v=UOn0b5kn3jk) showing how to use this feature. This has some drawbacks as well, for example the inline script might be blocked by CSP.
|
|
55
|
-
|
|
56
|
-
Another idea would be to use something like Cloudflare workers to inject the script into the HTML stream. To work around CSP issues, you can write the worker in such a way that it parses out the correct `nonce` and adds it to the inline script. _(Note: Not tested, but please share examples if you get it working! _😄_)_
|
|
57
|
-
|
|
58
|
-
## Summary view
|
|
59
|
-
|
|
60
|
-
The script logs two info groups to the console: the actual order of the `<head>`, and the optimal order. In this collapsed view, you can see at a glance whether there are any high impact elements out of order.
|
|
61
|
-
|
|
62
|
-
Each "weight" has a corresponding color, with red being the highest and blue/grey being the lowest. See [rules.js](https://github.com/rviscomi/capo.js/blob/main/src/lib/rules.js) for the exact mapping.
|
|
63
|
-
|
|
64
|
-
Here are a few examples.
|
|
65
|
-
|
|
66
|
-
### `www.nytimes.com`
|
|
67
|
-
|
|
68
|
-
<img width="1314" alt="image" src="https://github.com/rviscomi/capo.js/assets/1120896/5c19e758-9f88-42c1-81e8-9f757a6c92be"/>
|
|
69
|
-
|
|
70
|
-
### `docs.github.io`
|
|
71
|
-
|
|
72
|
-
<img width="819" alt="image" src="https://github.com/rviscomi/capo.js/assets/1120896/798a0e99-04dd-4d27-a241-b5d77320a46e"/>
|
|
73
|
-
|
|
74
|
-
### `web.dev`
|
|
75
|
-
|
|
76
|
-
<img width="842" alt="image" src="https://github.com/rviscomi/capo.js/assets/1120896/fe6bb67c-697a-4fdf-aa28-52429239fcf5"/>
|
|
77
|
-
|
|
78
|
-
### `stackoverflow.com`
|
|
79
|
-
|
|
80
|
-
<img width="626" alt="image" src="https://github.com/rviscomi/capo.js/assets/1120896/8964fed2-e933-4795-ada6-79c56cbc416d"/>
|
|
81
|
-
|
|
82
|
-
## Detailed view
|
|
83
|
-
|
|
84
|
-
Expanding the actual or sorted views reveals the detailed view. This includes an itemized list of each `<head>` element and its weight as well as a reference to the actual or sorted `<head>` element.
|
|
85
|
-
|
|
86
|
-
### `www.nytimes.com`
|
|
87
|
-
|
|
88
|
-
Here you can see a drilled-down view of the end of the `<head>` for the NYT site, where high impact origin trial meta elements are set too late.
|
|
89
|
-
|
|
90
|
-
<img width="472" alt="image" src="https://github.com/rviscomi/capo.js/assets/1120896/c0342d54-9e23-4b91-8df1-277c251ee0c5"/>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
## Next steps
|
|
94
|
-
|
|
95
|
-
<CardGrid stagger>
|
|
96
|
-
<Card title="Try it" icon="open-book">
|
|
97
|
-
Read the [quick start guide](/capo.js/user/quick-start/).
|
|
98
|
-
</Card>
|
|
99
|
-
<Card title="Get the extension" icon="external">
|
|
100
|
-
Go to [rviscomi.dev/capo-crx](https://rviscomi.dev/capo-crx) to install the extension.
|
|
101
|
-
</Card>
|
|
102
|
-
<Card title="Start contributing" icon="setting">
|
|
103
|
-
[Contribute](/capo.js/developer/contributing/) to the Capo project.
|
|
104
|
-
</Card>
|
|
105
|
-
<Card title="Submit an issue" icon="error">
|
|
106
|
-
Something not working? [File an issue on GitHub.](https://github.com/rviscomi/capo.js/issues/new)
|
|
107
|
-
</Card>
|
|
108
|
-
</CardGrid>
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Migration to v2.0.0
|
|
3
|
-
description: Guide for migrating from v1 to v2 of Capo.js
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Breaking changes
|
|
7
|
-
|
|
8
|
-
### Programmatic API restructuring
|
|
9
|
-
|
|
10
|
-
The library has been refactored to provide a more direct and modern API. The previous version exported modules as namespaces, whereas v2.0.0 exports functions and constants directly.
|
|
11
|
-
|
|
12
|
-
**Before (v1):**
|
|
13
|
-
|
|
14
|
-
```javascript
|
|
15
|
-
import { rules, validation } from '@rviscomi/capo.js';
|
|
16
|
-
|
|
17
|
-
const weight = rules.getWeight(element);
|
|
18
|
-
const isValid = validation.isValidElement(element);
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
**After (v2):**
|
|
22
|
-
|
|
23
|
-
```javascript
|
|
24
|
-
import { getWeight, isValidElement, BrowserAdapter } from '@rviscomi/capo.js';
|
|
25
|
-
|
|
26
|
-
const adapter = new BrowserAdapter();
|
|
27
|
-
const weight = getWeight(element, adapter);
|
|
28
|
-
const isValid = isValidElement(element, adapter);
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Removal of WebPageTest and BigQuery support
|
|
32
|
-
|
|
33
|
-
Support for WebPageTest and BigQuery has been removed from the core library to reduce maintenance burden and focus on the core analysis engine. This includes the removal of the `webpagetest/` and `bigquery/` directories.
|
|
34
|
-
|
|
35
|
-
### Removal of Capo.js snippet
|
|
36
|
-
|
|
37
|
-
The standalone Capo.js snippet has been removed. Users are encouraged to use the Chrome extension or the programmatic API.
|
|
38
|
-
|
|
39
|
-
## New features and improvements
|
|
40
|
-
|
|
41
|
-
### New adapter system
|
|
42
|
-
|
|
43
|
-
Capo.js now supports a flexible adapter system, allowing it to run on different DOM implementations.
|
|
44
|
-
|
|
45
|
-
- **Built-in adapter**: The `BrowserAdapter` is provided for standard browser DOM environments.
|
|
46
|
-
- **Custom adapters**: Consumers can implement their own adapters by extending the base `AdapterInterface` class. This enables Capo.js to work with different parsers (like JSDOM or ASTs), unlocking its use in static analysis tools.
|
|
47
|
-
|
|
48
|
-
```javascript
|
|
49
|
-
import { BrowserAdapter, analyzeHead } from '@rviscomi/capo.js';
|
|
50
|
-
|
|
51
|
-
const adapter = new BrowserAdapter();
|
|
52
|
-
const results = analyzeHead(document.head, adapter);
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### New validation rules
|
|
56
|
-
|
|
57
|
-
- **Font preload missing crossorigin**: Capo.js now validates that font preloads include the `crossorigin` attribute.
|
|
58
|
-
|
|
59
|
-
### Virtual console
|
|
60
|
-
|
|
61
|
-
The demo page now includes a virtual console, making it easier to see Capo output right in the docs, without needing to open the browser console.
|
|
62
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Static vs dynamic assessment modes
|
|
3
|
-
description: Learn about and when to use static versus dynamic assessment modes
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Capo.js supports two modes of assessment: **static** and **dynamic**. Understanding the difference between these modes is crucial for interpreting the results and choosing the right tool for the job.
|
|
7
|
-
|
|
8
|
-
## Static Mode
|
|
9
|
-
|
|
10
|
-
In static mode, Capo.js analyzes the server-rendered HTML of the page. This is achieved by fetching the page's URL and parsing the returned HTML.
|
|
11
|
-
|
|
12
|
-
1. Capo.js fetches the current page's URL.
|
|
13
|
-
2. It parses the response body to extract the `<head>` element.
|
|
14
|
-
3. It analyzes the elements within this static `<head>`.
|
|
15
|
-
|
|
16
|
-
Static mode is ideal when you want to see how the page is delivered from the server, before any client-side JavaScript has modified the DOM. This is useful for identifying issues with the initial HTML structure.
|
|
17
|
-
|
|
18
|
-
Static mode is the default mode in the Capo.js Chrome Extension.
|
|
19
|
-
|
|
20
|
-
## Dynamic Mode
|
|
21
|
-
|
|
22
|
-
In dynamic mode, Capo.js analyzes the current state of the DOM in the browser.
|
|
23
|
-
|
|
24
|
-
1. Capo.js accesses the `document.head` element directly.
|
|
25
|
-
2. It analyzes the elements currently present in the `<head>`.
|
|
26
|
-
|
|
27
|
-
Dynamic mode is useful when you want to see the final state of the `<head>` after client-side scripts have run. This can help identify elements added or modified dynamically, which might affect performance or behavior.
|
|
28
|
-
|
|
29
|
-
Dynamic mode is the default mode when using the CLI, and can be enabled in the Chrome Extension options.
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Configuring capo.js
|
|
3
|
-
description: Learn how to use config options to customize the capo.js behavior
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import { Tabs, TabItem } from '@astrojs/starlight/components';
|
|
7
|
-
import CapoOptions from '../../../components/CapoOptions.astro';
|
|
8
|
-
import CapoPalette from '../../../components/CapoPalette.astro';
|
|
9
|
-
import InlineCapoIcon from '../../../components/InlineCapoIcon.astro';
|
|
10
|
-
|
|
11
|
-
You can configure how capo.js behaves in a couple of different ways depending on which tool you're using.
|
|
12
|
-
|
|
13
|
-
## Configuration options
|
|
14
|
-
|
|
15
|
-
By default, capo.js will:
|
|
16
|
-
- Prefer to evaluate the static, server-rendered head
|
|
17
|
-
- Validate the elements in the `<head>`
|
|
18
|
-
- Print using the default color palette
|
|
19
|
-
- Use the `Capo:` logging prefix
|
|
20
|
-
|
|
21
|
-
### Static and dynamic evaluation
|
|
22
|
-
|
|
23
|
-
By default, capo.js will try to evaluate a page's static `<head>`. This is important for validation, because browsers will automatically close the `<head>` when they encounter an invalid element. Without it, capo.js doesn't know which elements were originally marked up to be in the `<head>`.
|
|
24
|
-
|
|
25
|
-
Static evaluation is also useful if you want to ignore the order of dynamically injected elements. For example, if a third party script appends a `<meta>` element to the `<head>` after the page has already loaded, not only is that outside of your control, but it also doesn't have an adverse affect on the initial loading performance.
|
|
26
|
-
|
|
27
|
-
:::caution[Reliability warning]
|
|
28
|
-
In some cases, the static `<head>` can't be evaluated. For example, some pages have no explicit `<head>` tags at all. When this happens, capo.js will fall back to dynamic evaluation. This is indicated by a warning in the console:
|
|
29
|
-
|
|
30
|
-
> _Unable to parse the static (server-rendered) `<head>`. Falling back to document.head_
|
|
31
|
-
|
|
32
|
-
In a very small number of [cases](https://github.com/rviscomi/capo.js/issues/31), getting the static `<head>` might cause the page to crash without falling back. If this affects you, you can explicitly set the `preferredAssessmentMode` parameter to `"dynamic"` to force capo.js to use dynamic evaluation.
|
|
33
|
-
:::
|
|
34
|
-
|
|
35
|
-
To use static evaluation, omit the `preferredAssessmentMode` parameter, or explicitly set it to `"static"`.
|
|
36
|
-
|
|
37
|
-
To use dynamic evaluation, set the `preferredAssessmentMode` parameter to `"dynamic"`.
|
|
38
|
-
|
|
39
|
-
### Validation
|
|
40
|
-
|
|
41
|
-
By default, capo.js will log validation warnings, including things like [HTML spec](https://html.spec.whatwg.org/multipage/semantics.html#the-head-element) violations, major performance concerns, or expired origin trial tokens.
|
|
42
|
-
|
|
43
|
-

|
|
44
|
-
|
|
45
|
-
To enable validation, omit the `validation` parameter, or explicitly set it to `true`.
|
|
46
|
-
|
|
47
|
-
To disable validation, set the `validation` parameter to `false`.
|
|
48
|
-
|
|
49
|
-
### Built-in color palettes
|
|
50
|
-
|
|
51
|
-
capo.js supports three built-in color palettes:
|
|
52
|
-
|
|
53
|
-
- `"DEFAULT"` (rainbow)
|
|
54
|
-
- `"PINK"`
|
|
55
|
-
- `"BLUE"`
|
|
56
|
-
|
|
57
|
-
The extension supports [custom color palettes](#custom-color-palette).
|
|
58
|
-
|
|
59
|
-
#### Default
|
|
60
|
-
|
|
61
|
-
<CapoPalette colors='[
|
|
62
|
-
"#9e0142",
|
|
63
|
-
"#d53e4f",
|
|
64
|
-
"#f46d43",
|
|
65
|
-
"#fdae61",
|
|
66
|
-
"#fee08b",
|
|
67
|
-
"#e6f598",
|
|
68
|
-
"#abdda4",
|
|
69
|
-
"#66c2a5",
|
|
70
|
-
"#3288bd",
|
|
71
|
-
"#5e4fa2",
|
|
72
|
-
"#cccccc"
|
|
73
|
-
]' />
|
|
74
|
-
|
|
75
|
-
#### Pink
|
|
76
|
-
|
|
77
|
-
<CapoPalette colors='[
|
|
78
|
-
"oklch(5% .1 320)",
|
|
79
|
-
"oklch(13% .2 320)",
|
|
80
|
-
"oklch(25% .2 320)",
|
|
81
|
-
"oklch(35% .25 320)",
|
|
82
|
-
"oklch(50% .27 320)",
|
|
83
|
-
"oklch(67% .31 320)",
|
|
84
|
-
"oklch(72% .25 320)",
|
|
85
|
-
"oklch(80% .2 320)",
|
|
86
|
-
"oklch(90% .1 320)",
|
|
87
|
-
"oklch(99% .05 320)",
|
|
88
|
-
"#ccc"
|
|
89
|
-
]' />
|
|
90
|
-
|
|
91
|
-
#### Blue
|
|
92
|
-
|
|
93
|
-
<CapoPalette colors='[
|
|
94
|
-
"oklch(5% .1 200)",
|
|
95
|
-
"oklch(13% .2 200)",
|
|
96
|
-
"oklch(25% .2 200)",
|
|
97
|
-
"oklch(35% .25 200)",
|
|
98
|
-
"oklch(50% .27 200)",
|
|
99
|
-
"oklch(67% .31 200)",
|
|
100
|
-
"oklch(72% .25 200)",
|
|
101
|
-
"oklch(80% .2 200)",
|
|
102
|
-
"oklch(90% .1 200)",
|
|
103
|
-
"oklch(99% .05 200)",
|
|
104
|
-
"#ccc"
|
|
105
|
-
]' />
|
|
106
|
-
|
|
107
|
-
## Configuring the extension
|
|
108
|
-
|
|
109
|
-
Open the **Options** page to configure the [extension](/capo.js/user/extension/):
|
|
110
|
-
|
|
111
|
-
1. Right click on the extension icon <InlineCapoIcon />
|
|
112
|
-
|
|
113
|
-

|
|
114
|
-
|
|
115
|
-
2. Select **Options**
|
|
116
|
-
|
|
117
|
-
Select or deselect the options you want to enable or disable.
|
|
118
|
-
|
|
119
|
-
<CapoOptions/>
|
|
120
|
-
|
|
121
|
-
Options are saved automatically after each change.
|
|
122
|
-
|
|
123
|
-
:::note
|
|
124
|
-
The extension doesn't support custom logging prefixes. Also, only [built-in color palettes](#built-in-color-palettes) are available.
|
|
125
|
-
:::
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
For example, the default values are:
|
|
129
|
-
|
|
130
|
-
```js
|
|
131
|
-
window.__CAPO__ = {
|
|
132
|
-
// [ 'static' | 'dynamic' ]
|
|
133
|
-
preferredAssessmentMode: 'static',
|
|
134
|
-
// [ true | false ]
|
|
135
|
-
validation: true,
|
|
136
|
-
// [ 'DEFAULT' | 'PINK' | 'BLUE' | ColorArray ]
|
|
137
|
-
palette: 'DEFAULT',
|
|
138
|
-
// Any string
|
|
139
|
-
loggingPrefix: 'Capo: '
|
|
140
|
-
}
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Or if you only wanted to disable validation:
|
|
144
|
-
|
|
145
|
-
```js
|
|
146
|
-
window.__CAPO__ = {
|
|
147
|
-
validation: false
|
|
148
|
-
}
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
The `__CAPO__` object must be set in the global scope (`window`) before capo.js runs for it to take effect.
|
|
152
|
-
|
|
153
|
-
### Custom color palette
|
|
154
|
-
|
|
155
|
-
The `palette` config property accepts string constants for preset color palettes: `DEFAULT`, `PINK`, and `BLUE`. It also optionally accepts an array of colors for a custom palette.
|
|
156
|
-
|
|
157
|
-
For example, if—for whatever reason—you wanted to arrange the colors to match the [2022-2023 NHL standings](https://www.nhl.com/standings/2022/league):
|
|
158
|
-
|
|
159
|
-
<CapoPalette colors='[
|
|
160
|
-
"#FFB81C",
|
|
161
|
-
"#A4A9AD",
|
|
162
|
-
"#CE1126",
|
|
163
|
-
"#00205B",
|
|
164
|
-
"#B4975A",
|
|
165
|
-
"#FF4C00",
|
|
166
|
-
"#6F263D",
|
|
167
|
-
"#006847",
|
|
168
|
-
"#0038A8",
|
|
169
|
-
"#111111",
|
|
170
|
-
"#154734"
|
|
171
|
-
]' />
|
|
172
|
-
|
|
173
|
-
```js
|
|
174
|
-
window.__CAPO__ = {
|
|
175
|
-
palette: [
|
|
176
|
-
'#FFB81C', // Bruins
|
|
177
|
-
'#A4A9AD', // Hurricanes
|
|
178
|
-
'#CE1126', // Devils
|
|
179
|
-
'#00205B', // Maple Leafs
|
|
180
|
-
'#B4975A', // Golden Knights
|
|
181
|
-
'#FF4C00', // Oilers
|
|
182
|
-
'#6F263D', // Avalanche
|
|
183
|
-
'#006847', // Stars
|
|
184
|
-
'#0038A8', // Rangers
|
|
185
|
-
'#111111', // Kings
|
|
186
|
-
'#154734' // Wild
|
|
187
|
-
]
|
|
188
|
-
}
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-

|
|
192
|
-
|
|
193
|
-
You can provide colors in any format supported by Chrome, for example: hex, rgb, hsl, oklch, named colors, etc. Formats can also be mixed and matched within the same config.
|
|
194
|
-
|
|
195
|
-
The array must contain exactly 11 colors.
|