fix(docs): add rule options to readme
This commit is contained in:
parent
6f4b324cc8
commit
3cbf443ee6
1
Makefile
1
Makefile
|
@ -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
|
||||
|
|
11
README.md
11
README.md
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue