Files
nrwl--nx/packages/eslint/docs/workspace-rule-examples.md
2026-07-13 12:38:36 +08:00

516 B

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/eslint:workspace-rule my-custom-rule
Custom sub-folder

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

nx g @nx/eslint: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.