checkIsInNodeModules
Checks whether a path sits inside a node_modules folder at any depth.
Matches on a full path SEGMENT rather than a substring, so a file whose own name merely contains the word (node_modules-migration.md) is not swept up with it.
Import:
import { checkIsInNodeModules } from 'obsidian-dev-utils/script-utils/linters/markdownlint-ignores';Signature:
function checkIsInNodeModules(path: string): booleanParameters:
| Parameter | Type | Description |
|---|---|---|
path | string | A path relative to the repository root, separated by / (the form git ls-files emits). |
Returns: boolean — true when the path is inside a node_modules folder.