@atlaskit/eslint-plugin-ui-styling-standard
Version:
The eslint plugin to enforce and educate on Atlassian's UI Styling Standard
18 lines (17 loc) • 732 B
TypeScript
import type { Rule } from 'eslint';
import type * as ESTree from 'eslint-codemod-utils';
type StyleFunctionName = 'css' | 'cssMap' | 'keyframes' | 'styled' | 'xcss';
export type StyleCall = {
importSource: string;
node: ESTree.CallExpression;
styleFunction: StyleFunctionName;
};
/**
* Visit imported style calls without resolving every CallExpression against its current scope.
*
* ESLint has already linked import bindings to all of their references. Building this index once
* per source file makes each styling rule proportional to the number of style calls instead of the
* number of all calls in the file.
*/
export declare function getStyleCalls(context: Rule.RuleContext): readonly StyleCall[];
export {};