fix(client): lint:layers holds src/types.ts to the rules of types

A file's layer was the first path segment under src/, so src/types.ts,
the shared types module every layer imports as '../types', got the
layer "types.ts" and no rule at all, while the imports into it already
resolved to "types". It could import a component or a page unnoticed.
A file directly in src/ is now the layer of its name without the
extension, for the importer and the import alike. No file changes its
count: types.ts imports only @trek/shared today.
This commit is contained in:
Maurice
2026-10-08 12:50:33 +02:00
parent 6a6f3f6cf6
commit 3e37dcfb45
4 changed files with 38 additions and 8 deletions
+2 -1
View File
@@ -17,7 +17,8 @@ const VIEW = ['components', 'mobile', 'pages', 'hooks'];
* (date helpers) are helpers like utils/. Directories without an entry are
* free on purpose: mobile and pages sit at the top, the app root wires
* everything, and managed/ is the slot an operator fills with whole screens
* at build time.
* at build time. A file directly in src/ is the layer of its name, so
* src/types.ts falls under types like the src/types/ directory.
*/
export const RULES = {
components: ['pages', 'mobile'],