nx/packages/linter/docs/workspace-rule-examples.md
Isaac Mann afa5eb59fa
docs(core): document the @nrwl => @nx rescope (#16403)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2023-04-27 18:14:59 -04:00

586 B

{% tabs %} {% tab label="Create rule" %}

This command will generate a new workspace lint rule called my-custom-rule. The new rule will be generated in tools/eslint-rules/rules folder:

nx g @nx/linter:workspace-rule my-custom-rule

{% /tab %} {% tab label="Custom sub-folder" %}

We can change the default sub-folder from rules and specify a custom one:

nx g @nx/linter:workspace-rule --name=my-custom-rule --directory=my/custom/path

The command above will generate the rule in tools/eslint-rules/my/custom/path folder.

{% /tab %} {% /tabs %}