Chore: Add emotion object syntax rule to eslint (#95429)

add object syntax rule to eslint
pull/95525/head
Ashley Harrison 8 months ago committed by GitHub
parent f6a5e03bfb
commit 55673e2f41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      .betterer.ts
  2. 1
      .eslintrc
  3. 1
      packages/grafana-ui/.eslintrc
  4. 12
      public/app/angular/components/PageHeader/PageHeader.tsx

@ -89,7 +89,6 @@ function countEslintErrors() {
const baseConfig = await cli.calculateConfigForFile(filePaths[0]);
const baseRules: Partial<Linter.RulesRecord> = {
'@emotion/syntax-preference': [2, 'object'],
'@typescript-eslint/no-explicit-any': 'error',
'@grafana/no-aria-label-selectors': 'error',
'no-restricted-imports': [

@ -18,6 +18,7 @@
"import/external-module-folders": ["node_modules", ".yarn"],
},
"rules": {
"@emotion/syntax-preference": [2, "object"],
"@grafana/no-border-radius-literal": "error",
"@grafana/no-unreduced-motion": "error",
"react/prop-types": "off",

@ -1,6 +1,5 @@
{
"rules": {
"@emotion/syntax-preference": [2, "object"],
"no-restricted-imports": [
"error",
{

@ -139,9 +139,9 @@ function renderHeaderTitle(title: string, highlightText: NavModelItem['highlight
{highlightText && (
<ProBadge
text={highlightText}
className={css`
vertical-align: middle;
`}
className={css({
verticalAlign: 'middle',
})}
/>
)}
</h1>
@ -159,7 +159,7 @@ const getStyles = (theme: GrafanaTheme2) => ({
flexDirection: 'column',
gap: theme.spacing(1),
}),
headerCanvas: css`
background: ${theme.colors.background.canvas};
`,
headerCanvas: css({
background: theme.colors.background.canvas,
}),
});

Loading…
Cancel
Save