first commit

This commit is contained in:
2026-08-06 12:00:39 +10:00
commit 91221f5a8e
3259 changed files with 569069 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
/**
* @fileoverview Utility functions for ESLint CSS plugin.
* @author Nicholas C. Zakas
*/
//-----------------------------------------------------------------------------
// Type Definitions
//-----------------------------------------------------------------------------
/**
* @import { SyntaxMatchError, SyntaxReferenceError } from "@eslint/css-tree"
*/
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
/**
* Determines if an error is a syntax match error.
* @param {Object} error The error object to check.
* @returns {error is SyntaxMatchError} True if the error is a syntax match error, false if not.
*/
export function isSyntaxMatchError(error) {
return typeof error.syntax === "string";
}
/**
* Determines if an error is a syntax reference error.
* @param {Object} error The error object to check.
* @returns {error is SyntaxReferenceError} True if the error is a syntax reference error, false if not.
*/
export function isSyntaxReferenceError(error) {
return typeof error.reference === "string";
}