Move store-connected components out of ui/ into components/music and lint the ui boundary
This commit is contained in:
@@ -48,6 +48,34 @@ export default ts.config(
|
||||
'@typescript-eslint/no-unused-expressions': 'off'
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['src/lib/components/ui/**'],
|
||||
rules: {
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
patterns: [
|
||||
{
|
||||
group: ['../*'],
|
||||
message: 'Use $lib/... instead of relative parent imports.'
|
||||
},
|
||||
{
|
||||
group: [
|
||||
'$lib/player/*',
|
||||
'$lib/data/*',
|
||||
'$lib/server/*',
|
||||
'$lib/components/music/*',
|
||||
'$lib/components/shell/*',
|
||||
'$lib/components/player/*'
|
||||
],
|
||||
message:
|
||||
'components/ui is the presentation layer: it cannot depend on app state, data or other component layers.'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
ignores: ['build/', '.svelte-kit/', 'static/', 'src/lib/api/schema.d.ts']
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user