1
0
Fork 0

fix(docs): add rule options to readme

This commit is contained in:
ssube 2019-11-09 22:48:15 -06:00
parent 6f4b324cc8
commit 3cbf443ee6
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 12 additions and 0 deletions

View File

@ -97,6 +97,7 @@ build: build-bundle build-docs
build-bundle: node_modules
$(NODE_BIN)/rollup --config $(CONFIG_PATH)/rollup.js
sed -i '1s;^;#! /usr/bin/env node\n\n;' $(TARGET_PATH)/index.js
chmod ug+x $(TARGET_PATH)/index.js
build-docs: ## generate html docs
$(NODE_BIN)/api-extractor run --config $(CONFIG_PATH)/api-extractor.json --local -v

View File

@ -25,6 +25,7 @@ supports multiple documents per stream or file, inserting defaults, and other ma
- [List Mode](#list-mode)
- [Rules](#rules)
- [Enabling Rules](#enabling-rules)
- [Loading Rules](#loading-rules)
- [Validate Rules](#validate-rules)
- [License](#license)
@ -326,6 +327,16 @@ To enable a group of rules by level, `--include-level warn`.
To enable a group of rules by tag, `--include-tag foo`.
#### Loading Rules
Rules can be loaded from a file, module, or path.
To load a file by name, `--rule-file foo.yml`. This will accept any extension.
To load a module, `--rule-module foo`. The required module exports [are documented here](./docs/rules.md#from-module).
To load a path, `--rule-path foo/`. This will recursively load any files matching `*.+(json|yaml|yml)`.
#### Validate Rules
To validate the rules in the `rules/` directory using the meta-rules: