How to use the @hint/utils-css.getFullCSSCodeSnippet function in @hint/utils-css

To help you get started, we’ve selected a few @hint/utils-css examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webhintio / hint / packages / hint-css-prefix-order / src / hint.ts View on Github external
ast.walkRules((rule) => {
                for (const invalidPair of validateRule(rule)) {
                    const message = formatMessage(invalidPair);
                    const isValue = invalidPair.lastPrefixed.prop === invalidPair.unprefixed.prop;
                    const location = getCSSLocationFromNode(invalidPair.unprefixed, { isValue });
                    const codeSnippet = getFullCSSCodeSnippet(invalidPair.unprefixed);
                    const severity = Severity.warning;

                    context.report(
                        resource,
                        message,
                        { codeLanguage: 'css', codeSnippet, element, location, severity });
                }
            });
        });

@hint/utils-css

utils for CSS

Apache-2.0
Latest version published 1 year ago

Package Health Score

81 / 100
Full package analysis