You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ Some validations do more than just validating your data shape, they check for be
81
81
-**no-root-files-node-modules-nameclash** (default: true): this checks that files/folders that are found in directories specified via webpacks `resolve.root` option do not nameclash with `node_modules` packages. This prevents nasty path resolving bugs (for a motivating example, have a look at [this redux issue](https://github.com/reactjs/redux/issues/1681)).
82
82
83
83
You opt in/out of rules by using the `rules` option:
**Note**: This is not yet implemented via cli options, the default rules will apply in that case.
93
93
94
94
#### Quiet Mode
95
-
If you want to mute console output apart from errors, set `--quiet` (`-q`) or `validate(config, yourSchema, {quiet: true})`. This is particularly useful if you are using webpack `--json` as you'll want to avoid writing additional text to the JSON output.
95
+
If you want to mute console output apart from errors, set `--quiet` (`-q`) or `validate(config, { quiet:true})`. This is particularly useful if you are using webpack `--json` as you'll want to avoid writing additional text to the JSON output.
96
96
97
-
#### Validate All**package.json**`scripts`
97
+
#### Validate all **package.json** `scripts`
98
98
It is possible to use the CLI to validate all your **package.json** `scripts` related configurations at once by using `--all-scripts` (`-a`). The system will try to guess the convention you are using and then executes validation against each script target based on that.
99
99
100
100
#### Advanced Usage
101
-
If you need to access the validation results directly and want to control the side-effects (i.e. console.log output, `process.exit(1)` on fail behaviour) yourself, you can call the validation function like so: `validate(config, yourSchema, { returnValidation: true })`. This will make 1) the function return the validation results instead of your configuration and 2) not perform any side effects.
101
+
If you need to access the validation results directly and want to control the side-effects (i.e. console.log output, `process.exit(1)` on fail behaviour) yourself, you can call the validation function like so: `validate(config, { returnValidation:true })`. This will make 1) the function return the validation results instead of your configuration and 2) not perform any side effects.
102
102
103
103
#### Support
104
104
Because this module uses the amazing `Joi` validation library, this module only supports Node >=4.0.0.
0 commit comments