Chore: prevents imports from grafana packages in i18n (#111000)

This commit is contained in:
Hugo Häggmark 2025-09-12 10:26:50 +02:00 committed by GitHub
parent 1944d2dd0e
commit b747ec8f24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 20 additions and 0 deletions

View File

@ -552,4 +552,24 @@ module.exports = [
'no-barrel-files/no-barrel-files': 'error', 'no-barrel-files/no-barrel-files': 'error',
}, },
}, },
{
// @grafana/i18n shouldn't import from our 'library' NPM packages
name: 'grafana/packages-that-i18n-cant-import',
files: ['packages/grafana-i18n/**/*.{ts,tsx}'],
ignores: [],
rules: {
'no-restricted-imports': [
'error',
withBaseRestrictedImportsConfig({
patterns: [
{
group: ['@grafana/*'],
message: "'@grafana/* packages' should not be imported in @grafana/i18n",
},
],
}),
],
},
},
]; ];