Chore: move the a11y rules to the overrides section so they don't apply to t… (#55848)

* move the a11y rules to the overrides section so they don't apply to tests

* turn alt-text back off
pull/55855/head
Ashley Harrison 3 years ago committed by GitHub
parent e160f19247
commit 97f1524b66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 54
      .eslintrc

@ -34,9 +34,35 @@
// Use typescript's no-redeclare for compatibility with overrides
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["error"],
"@typescript-eslint/no-redeclare": ["error"]
},
"overrides": [
{
"files": ["packages/grafana-ui/src/components/uPlot/**/*.{ts,tsx}"],
"rules": {
"react-hooks/rules-of-hooks": "off",
"react-hooks/exhaustive-deps": "off"
}
},
{
"files": ["packages/grafana-ui/src/components/ThemeDemos/**/*.{ts,tsx}"],
"rules": {
"@emotion/jsx-import": "off",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off"
}
},
{
"files": ["public/dashboards/scripted*.js"],
"rules": {
"no-redeclare": "error",
"@typescript-eslint/no-redeclare": "off"
}
},
{
"files": ["**/*"],
"excludedFiles": ["**/*.{spec,test}.{ts,tsx}"],
"rules": {
// these are all the rules listed in the strict preset
// we should fix them one by one and mark them as errors
// once they're all fixed, we can remove them all and instead extend the strict preset
@ -94,28 +120,6 @@
"jsx-a11y/role-supports-aria-props": "error",
"jsx-a11y/scope": "error",
"jsx-a11y/tabindex-no-positive": "error"
},
"overrides": [
{
"files": ["packages/grafana-ui/src/components/uPlot/**/*.{ts,tsx}"],
"rules": {
"react-hooks/rules-of-hooks": "off",
"react-hooks/exhaustive-deps": "off"
}
},
{
"files": ["packages/grafana-ui/src/components/ThemeDemos/**/*.{ts,tsx}"],
"rules": {
"@emotion/jsx-import": "off",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off"
}
},
{
"files": ["public/dashboards/scripted*.js"],
"rules": {
"no-redeclare": "error",
"@typescript-eslint/no-redeclare": "off"
}
}
]

Loading…
Cancel
Save