UI Styling Standard
The eslint plugin to enforce and educate on Atlassian's UI Styling Standardno-array-arguments
Blocks passing array arguments to style declaration functions.
Examples
Incorrect
import { css } from '@compiled/react';
const styles = css([{ width: 100 }, { height: 100 }]);import { styled } from '@compiled/react';
const styles = css([{ width: 100 }, ...items]);Correct
import { css } from '@compiled/react';
const styles = css({ width: 100 }, { height: 100 });import { css } from '@compiled/react';
const styles = css({ width: 100 }, ...items);Options
importSources: string[]
By default, this rule will check styles using:
@atlaskit/css@atlaskit/primitives@compiled/react@emotion/react@emotion/core@emotion/styledstyled-components
Override this list with the importSources option, which accepts an array of package names.