@antebudimir/eslint-plugin-vanilla-extract
Version:
ESLint plugin for enforcing best practices in vanilla-extract CSS styles, including CSS property ordering and additional linting rules.
16 lines (15 loc) • 503 B
JavaScript
import { TSESTree } from '@typescript-eslint/utils';
/**
* Type guard to check if a node is an ObjectExpression.
*/
export const isObjectExpression = (node) => {
return node.type === 'ObjectExpression';
};
/**
* Checks if an object expression is empty (has no properties).
* @param node The node to check.
* @returns True if the node is an ObjectExpression with no properties.
*/
export const isEmptyObject = (node) => {
return isObjectExpression(node) && node.properties.length === 0;
};