@atlaskit/eslint-plugin-design-system
Version:
The essential plugin for use with the Atlassian Design System.
22 lines (21 loc) • 875 B
TypeScript
import type { Rule } from 'eslint';
import { type CallExpression, type ObjectExpression } from 'eslint-codemod-utils';
export declare const FunctionCall: {
getName(node: CallExpression): string | undefined;
updateName(node: CallExpression, newName: string, fixer: Rule.RuleFixer): Rule.Fix;
/**
* Function arguments can be many things:
* `css(myStyles, () => {}, undefined, 'literal', ...rest) // etc`
* They all need slightly different treatment.
*
* Currently 'getArgumentAtPos' only implements strategies for Literals and ObjectExpressions.
* If you need to support another type of arg, add it, and update the type.
*/
getArgumentAtPos(node: CallExpression, pos: number): {
type: 'Literal';
value: string;
} | {
type: 'ObjectExpression';
value: ObjectExpression;
} | undefined;
};