Add eslint rules for restricted imports

This commit is contained in:
Bill Thornton
2025-04-09 18:02:49 -04:00
parent c1780ea8b0
commit 590ce49f15

View File

@@ -128,7 +128,35 @@ export default tseslint.config(
'@stylistic/quotes': ['error', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': false }],
'@stylistic/semi': 'error',
'@stylistic/space-before-blocks': 'error',
'@stylistic/space-infix-ops': 'error'
'@stylistic/space-infix-ops': 'error',
'@typescript-eslint/no-restricted-imports': [
'error',
{
paths: [
{
name: '@jellyfin/sdk/lib/generated-client',
message: 'Use direct file imports for tree-shaking',
allowTypeImports: true
},
{
name: '@jellyfin/sdk/lib/generated-client/api',
message: 'Use direct file imports for tree-shaking',
allowTypeImports: true
},
{
name: '@jellyfin/sdk/lib/generated-client/models',
message: 'Use direct file imports for tree-shaking',
allowTypeImports: true
},
{
name: '@mui/material',
message: 'Use direct file imports for tree-shaking',
allowTypeImports: true
}
]
}
]
}
},