Route tests through a #testing alias, ban ../ imports, and document the alias ownership rule
Check / check (pull_request) Successful in 46s
Check / check (pull_request) Successful in 46s
This commit is contained in:
@@ -11,9 +11,7 @@ practice.
|
||||
off for `src/rules/index.ts`, the rule registry, which must import every
|
||||
rule. It is not a precedent for apps.
|
||||
- **`scripts/**`:** a narrow override is allowed when a tooling script truly
|
||||
needs it, e.g. `no-console` in a CLI script. Never one that only dodges
|
||||
import-check (e.g. `no-relative-bypass` for `vite.config.ts`); import-check
|
||||
ignores folders no `#` alias owns.
|
||||
needs it, e.g. `no-console` in a CLI script.
|
||||
- **Generated files:** list them in `ignorePatterns`, never `overrides`.
|
||||
- **Anything else needs the user's approval first.** When the user is away,
|
||||
don't add it: refactor, or leave the violation failing and log the question.
|
||||
@@ -45,3 +43,8 @@ pedantic hits in 274 files, of which `max-lines-per-function` 206,
|
||||
`max-lines` 145, `max-classes-per-file` 59, `max-dependencies` 45 (median 14
|
||||
imports, worst 29). The user chose refactoring over raising limits or
|
||||
matching memona's old hugoalh limits (2048 lines per file, no function limit).
|
||||
|
||||
Alias rule: an alias may point anywhere and owns its target (a folder's
|
||||
`index.ts` owns the folder and below, any other file owns only itself); no
|
||||
two aliases may own the same file, and `../` is banned everywhere
|
||||
([[imports-aliases-barrels]]).
|
||||
|
||||
Reference in New Issue
Block a user