_internal/config-file-scanner
Shared line-scanning helpers used by provider-config rules.
These utilities handle the common pattern of scanning YAML and TOML config files line-by-line without a full parser, which is appropriate because:
- ESLint rules need to analyse files that are not the currently-linted
JavaScript/TypeScript file (e.g.
amplify.yml,netlify.toml). - A full parse tree is not required â we only need to check for specific keys and simple scalar values at well-defined structural positions.
- Line-scanning is deliberately simple and fast; full YAML/TOML parsing would require additional runtime dependencies and adds little value for these targeted checks.