mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 13:22:21 +08:00
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
This commit is contained in:
54
.eslintrc
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"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user