@hero-design/snowflake-guard
Version:
A hero-design bot detecting snowflake usage
22 lines (21 loc) • 830 B
TypeScript
import * as recast from 'recast';
import type { CompoundMobileComponentName } from './types';
export type InlineStyleProps = 'style' | 'barStyle' | 'containerStyle' | 'textStyle';
export declare const INLINE_STYLE_PROPERTIES: string[];
export type ViolatingAttribute = {
attributeName: string;
attributeValue: string | null;
inlineStyleProps: InlineStyleProps;
componentName: CompoundMobileComponentName;
loc: number | undefined;
};
declare const reportInlineStyle: (ast: recast.types.ASTNode, attributes: recast.types.namedTypes.JSXAttribute[], componentName: CompoundMobileComponentName) => {
locs: {
style?: number;
barStyle?: number;
containerStyle?: number;
textStyle?: number;
};
violatingAttributes: ViolatingAttribute[];
};
export default reportInlineStyle;