Add eslint rules for restricted imports
This commit is contained in:
+29
-1
@@ -128,7 +128,35 @@ export default tseslint.config(
|
|||||||
'@stylistic/quotes': ['error', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': false }],
|
'@stylistic/quotes': ['error', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': false }],
|
||||||
'@stylistic/semi': 'error',
|
'@stylistic/semi': 'error',
|
||||||
'@stylistic/space-before-blocks': '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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user