-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor configuration loading logic
Currently, logic for loading configuration files is split between bin/repolinter.js (for loading URLs) and index.js (for local files, directories, and the default config). This commit refactors all configuration loading logic into a new lib/config.js module, which handles loading and validating config files of all types (existing parseConfig and validateConfig functions were moved as-is). This will make it simpler to extend config loading logic, for example to support inheriting rulesets (#21). This does have minor changes on the error messages returned by the CLI in some cases. It also attempts to parse all config files as JSON first and then YAML, regardless of file extensions (this was previously different for remote versus local config files). This does not change anything in repolinter's programmatic API.
- Loading branch information
1 parent
8b0b68e
commit 67ea12f
Showing
6 changed files
with
335 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.