grafana/packages/grafana-ui/.eslintrc
Jack Westbrook 82f353c696
Grafana UI: Fix plugin unit test errors (#69210)
* fix(grafana-ui): import from package to prevent import errors occurring in plugin tests

* style(grafana-ui): add e2e-selectors path to restricted imports rule
2023-05-30 15:34:13 +02:00

27 lines
600 B
Plaintext

{
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": ["@grafana/runtime", "@grafana/data/*", "@grafana/ui", "@grafana/e2e", "@grafana/e2e-selectors/*"],
"paths": [
{
"name": "react-i18next",
"importNames": ["Trans", "t"],
"message": "Please import from grafana-ui/src/utils/i18n instead"
}
]
}
]
},
"overrides": [
{
"files": ["**/*.{test,story}.{ts,tsx}"],
"rules": {
"no-restricted-imports": "off",
"react/prop-types": "off"
}
}
]
}