mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 18:30:41 -06:00
891f9c00a1
* I18n: Add lint rule to enforce correct i18n imports * ignore in gui wrapper
27 lines
572 B
Plaintext
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"
|
|
}
|
|
}
|
|
]
|
|
}
|