mirror of https://github.com/grafana/grafana.git
Chore: prevents imports from grafana packages in i18n (#111000)
This commit is contained in:
parent
1944d2dd0e
commit
b747ec8f24
|
@ -552,4 +552,24 @@ module.exports = [
|
|||
'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",
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue