Configuration
Extends
Layering other files beneath a file.
extends = "npm:@atypical/commit/conventional"extends = ["npm:@atypical/commit/conventional", "npm:@atypical/commit/gitmoji"]| Rule | Behavior |
|---|---|
| Position | Top level of the file |
| Type | A string, or an array of strings |
| Order | Targets in array order, then the extending file last |
| Nesting | Targets may have their own extends |
| Visibility | Removed during loading; no tool sees it |
Targets
| Form | Resolves to |
|---|---|
x.toml, ./x.toml, ../x.toml, /abs/x.toml | A file relative to the extending file |
npm:pkg/x, npm:pkg/x.toml | A file inside an installed npm package |
npm:resolves throughnode_moduleswith Node's algorithm, including the package'sexports. npm, pnpm, yarn and bun layouts are supported.@atypical/commitexports each preset by bare name:npm:@atypical/commit/conventional.- A prefix of two or more lowercase ASCII letters before
:is a scheme. Any other prefix, such as the drive letter inC:\x.toml, is part of a path.
Shared bases
A base shared by two targets is applied once per target. The later target's copy restates the base's values, replacing changes the earlier target made to the same keys.
Errors
| Error | Cause |
|---|---|
cyclic `extends` involving <path> | A file extends itself, directly or indirectly |
`extends` in <path> must be a string or an array of strings | Any other type |
cannot resolve `extends = "npm:..."`: ... | Package not installed, or file not exported |
`extends` scheme `cargo:` is not supported yet | A scheme other than npm: |
| The operating system's "not found" error | A relative or absolute path that does not exist |