Name of the component being validated
Example: "DataGrid", "EntityDataGrid", "SimpleChart"
Full component specification
Provides access to:
OptionalDialectSQL dialect for WHERE clause parsing and validation.
Used by the SqlWhereClauseValidator to parse SQL with the correct syntax for the target database platform (SQL Server, PostgreSQL, etc.). If not provided, the validator falls back to SQL Server dialect.
Map of entity name to entity metadata
Populated from componentSpec.dataRequirements.entities Used by validators that check field names, entity references, etc.
Example:
const memberEntity = entities.get('Members');
const fields = memberEntity.fields; // Array of EntityFieldInfo
The AST node being validated
This is typically the JSXAttribute node, but validators can traverse to child nodes for more specific location information.
Babel traversal path for the node
Provides access to parent nodes, scope information, and AST manipulation. Validators should not modify the AST - this is read-only validation.
Name of the property being validated
Example: "fields", "columns", "entityName", "extraFilter"
OptionalPropertyWhether the parent passed the property on the element.
The linter sets this on every context it builds. It is false only for a validator that
opted in with SemanticValidator.EvaluatesAbsentProp; then propertyValue is
undefined and Node is the element's opening tag. Optional so contexts built outside
the linter (tests, other tools) stay valid.
Extracted value of the property
This is the result of PropValueExtractor.extract() and can be:
If the value is a DynamicValue, validators should typically skip validation and return an empty violations array (the linter will warn the user).
Map of query name to query metadata
Populated from componentSpec.dataRequirements.queries Used by validators that check query references and parameters.
Example:
const query = queries.get('Sales by Region');
const params = query.parameters; // Array of QueryParameter
Map of sibling props on the same JSX element
Key is prop name, value is extracted value.
Used for constraints with dependsOn to access related prop values.
Example:
// <EntityDataGrid entityName="Members" fields={['FirstName', 'LastName']} />
siblingProps.get('entityName') // => "Members"
siblingProps.get('fields') // => ['FirstName', 'LastName']
Type inference engine for checking expression types
Used for advanced type checking beyond what PropValueExtractor provides. Can infer types of variables, function calls, etc.
Find field names similar to the given field name (for suggestions)
Uses fuzzy matching (Levenshtein distance or similar) to find close matches. Useful for "Did you mean?" error messages.
The field name to find matches for
Name of the entity to search in
OptionalmaxResults: numberMaximum number of suggestions (default: 3)
Array of similar field names, sorted by similarity
Get field metadata for an entity
Name of the entity
Array of field info, or empty array if entity not found
Get the data type of a specific field on an entity
Name of the entity
Name of the field
Data type string (e.g., 'string', 'number', 'date'), or null if not found
Get parameter metadata for a query
Name of the query
Array of parameter info, or empty array if query not found
Check if a query exists in the component's data requirements
Name of the query to check
OptionalcategoryPath: stringOptional category path for disambiguation
True if the query exists
Context object passed to semantic validators
Contains all information needed to validate a prop value against semantic constraints.