|
|
|
@ -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" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|