mirror of
https://github.com/antebudimir/eslint-plugin-vanilla-extract.git
synced 2026-01-01 17:23:31 +00:00
23 lines
624 B
TypeScript
23 lines
624 B
TypeScript
|
|
import type { Rule } from 'eslint';
|
||
|
|
import { createUnknownUnitVisitors } from './unknown-unit-visitor-creator.js';
|
||
|
|
|
||
|
|
const noUnknownUnitRule: Rule.RuleModule = {
|
||
|
|
meta: {
|
||
|
|
type: 'problem',
|
||
|
|
docs: {
|
||
|
|
description: 'disallow invalid or unknown CSS units in vanilla-extract style objects',
|
||
|
|
category: 'Possible Errors',
|
||
|
|
recommended: true,
|
||
|
|
},
|
||
|
|
schema: [],
|
||
|
|
messages: {
|
||
|
|
unknownUnit: 'The unit "{{ unit }}" in value "{{ value }}" is not recognized as a valid CSS unit.',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
create(context) {
|
||
|
|
return createUnknownUnitVisitors(context);
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
export default noUnknownUnitRule;
|