# Changelog

## 1.0.0

### Breaking Changes
 * The ruleset configuration format has been upgraded to [version 2](./README.md#creating-a-ruleset), including adding a [JSON schema](./rulesets/schema.json) and support for YAML. The previous ruleset format is still supported, however it is recommended that you translate your rulesets for this upgrade.
 * Major changes have been made to the `lint` function:
   * Formatting and printing have been moved outside `lint`, allowing the developer to suppress or modify the output as needed. This change is reflected in the new [CLI implementation](./bin/repolinter.js).
   * The object returned by lint (`LintResult`) has been completely restructured.
   * A `dryRun` parameter has been added to disable fixes.
   * `async` was added to the function interface.
 * Major changes have been make to the [JSON Formatter](index.js) to accommodate the structure change of `LintResult`.
 * Non top-level configuration support (ex. `targetdir/otherdir/repolinter.json` would trigger another lint of `otherdir`) has been removed for now.
 * Renamed several rule options to more clearly convey functionality (`files` -> `globsAny`) and remove problematic language (`blacklist` -> `denylist`). Backwards compatibility for old property names in version 1 rulesets is still maintained, however the schema will fail to validate in version 2.
 * Some slight changes have been made to the default formatter to accommodate the feature list below.

### Features
* [Automatic fixes](./docs/fixes.md) have been added. These fixes must be [configured in your ruleset](./README.md#rules) before they can be used, but are otherwise enabled by default.
* [Markdown formatting](README.md#formatting-the-output) is now supported via a CLI argument.
* CLI argument parsing has re-implemented with [Yargs](https://github.com/yargs/yargs) to allow for a more user-friendly experience. All previous commands and arguments remain, and the following new options are now available:
  * `--dryRun`/`-d` - Disable fixes.
  * `--allowPaths`/`-a` - Specify an allowlist that repolinter should limit itself to.
  * `--rulesetFile`/`-r` - Manually specify the configuration repolinter should use.
  * `--rulesetUrl`/`-u` - Specify a URL where repolinter can retrieve the ruleset from.
  * `--format`/`-f` - Change the output format.

  For more information on these options please see the [Repolinter CLI](./bin/repolinter.js).
* Added several other functions to the Node API: `runRuleset`, `determineTargets`, `validateConfig`, and `parseConfig`.
* Added TypeScript types for the Node API.
* Add numerical comparison support for axioms and the [`contributor-count`](./docs/axioms.md#contributor-count) axiom.

### Fixes
 * All file-based operations have been moved to `fs.promises`, which increased performance by a factor of 10.
 * Fixed some issues with Windows paths.
 * Updated NPM dependencies.
 * Added more tests and [autogenerated documentation](https://todogroup.github.io/repolinter/).
