diff --git a/eslint.config.mjs b/eslint.config.mjs index e094230ec..9c0ff1326 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -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 + } + ] + } + ] } },