compiled
compiled copied to clipboard
[ESLINT] @compiled/no-exported-css should not throw if exported component makes reference to css({})
Looking at the source code of this ESLint rule compiled/validate-definition.ts at master · atlassian-labs/compiled , it iterates through all of the references to css({}).
Example:
const foo = csscolor: 'red';
;
// @compiled/no-exported-css throws because bar references foo and bar is exported
export const bar = ${foo}
Same thing in our case here
const foo = csscolor: 'red';
;
// @compiled/no-exported-css throws as well export
export const bar = styled.div${foo}
Adjust the linting rule to allows the 2nd scenario because exporting a component is legit.