mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 01:28:55 +00:00
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:
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user