Workflow
Linting
Featurevisor provides a CLI command to lint your definition files, making sure they are all valid and won't cause any issues when you build your datafiles.
Usage#
Run:
Command
$ npx featurevisor lintAnd it will show you the errors in your definition files, if any.
If any errors are found, it will terminate with a non-zero exit code.
CLI options#
keyPattern#
You can also filter keys using regex patterns:
Command
$ npx featurevisor lint --keyPattern="myKeyHere"entityType#
If you want to filter it down further by entity type:
Command
$ npx featurevisor lint --keyPattern="myKeyHere" --entityType="feature"Possible values for --entityType:
attributesegmentfeaturegrouptest
NPM scripts#
If you are using npm scripts for linting your Featurevisor project like this:
package.json
{ "scripts": { "lint": "featurevisor lint" }}You can then pass your options in CLI after --:
$ npm run lint -- --keyPattern="myKeyHere"
