@atlaskit/eslint-plugin-ui-styling-standard
Version:
The eslint plugin to enforce and educate on Atlassian's UI Styling Standard
17 lines • 2.98 kB
JavaScript
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0;
import outdent from 'outdent';
var whereToGetHelp = "If you think this should be allowed, or if you're running into issues, reach out in #help-ui-styling-standard";
export var messages = {
'no-array-values': outdent(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n Arrays are not allowed in style objects. Support is inconsistent between styling libraries.\n\n Compose styles with the css prop instead.\n\n ", "\n "])), whereToGetHelp),
'no-conditional-values': outdent(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n Conditional expressions are not allowed in style objects.\n\n Conditionally apply styles with the css prop instead.\n\n ", "\n "])), whereToGetHelp),
'no-dynamic-keys': outdent(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n Dynamic keys are not allowed in style objects.\n\n ", "\n "])), whereToGetHelp),
'no-function-calls': outdent(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n Function calls are not allowed in style objects.\n\n ", "\n "])), whereToGetHelp),
'no-identifier-arguments': outdent(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n Variable arguments are not allowed.\n\n Inline the object value, or compose styles with the css prop instead.\n\n ", "\n "])), whereToGetHelp),
'no-object-access': outdent(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n Accessing object values is not allowed in style objects.\n\n If you are accessing the component's props, use the style prop to apply dynamic values instead.\n\n ", "\n "])), whereToGetHelp),
'no-object-references': outdent(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n Referencing objects is not allowed in style objects.\n\n Inline the object value instead.\n\n ", "\n "])), whereToGetHelp),
'no-spread-elements': outdent(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n Spread elements are not allowed in style objects.\n\n Compose styles with the css prop instead.\n\n ", "\n "])), whereToGetHelp),
// Fallback case if a more specific message is not applicable
'no-unsafe-values': outdent(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n Unsafe values are not allowed in style objects.\n\n ", "\n "])), whereToGetHelp),
'no-variables': outdent(_templateObject0 || (_templateObject0 = _taggedTemplateLiteral(["\n Variables are not allowed in style objects, unless they:\n\n - Have a simple, static value.\n - Are defined in the same file.\n\n Use the style prop to apply dynamic values instead.\n\n ", "\n "])), whereToGetHelp)
};