grafana/packages/grafana-ui/.eslintrc
Josh Hunt 891f9c00a1
I18n: Add lint rule to enforce correct i18n imports (#56487)
* I18n: Add lint rule to enforce correct i18n imports

* ignore in gui wrapper
2022-10-07 11:46:28 +01:00

27 lines
572 B
Plaintext

{
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": ["@grafana/runtime", "@grafana/data/*", "@grafana/ui", "@grafana/e2e"],
"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"
}
}
]
}