- [Create a Conformance Rule](https://nx-dev-git-docs-conformance-rule-recipe-nrwl.vercel.app/nx-api/powerpack-conformance/documents/create-conformance-rule) recipe Blocked until the `create-rule` generator is merged and released
60 lines
2.0 KiB
JSON
60 lines
2.0 KiB
JSON
{
|
|
"name": "create-rule",
|
|
"factory": "./src/generators/create-rule/create-rule",
|
|
"schema": {
|
|
"$schema": "http://json-schema.org/schema",
|
|
"id": "NxPowerpackConformanceCreateRule",
|
|
"title": "Create a new conformance rule",
|
|
"type": "object",
|
|
"cli": "nx",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "The name of the rule.",
|
|
"$default": { "$source": "argv", "index": 0 },
|
|
"x-prompt": "What is the name of the rule?",
|
|
"x-priority": "important"
|
|
},
|
|
"directory": {
|
|
"type": "string",
|
|
"description": "A directory where the rule directory is created.",
|
|
"x-prompt": "Which directory do you want to create the rule directory in?",
|
|
"x-priority": "important"
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"enum": ["consistency", "maintainability", "reliability", "security"],
|
|
"description": "The category of the rule.",
|
|
"x-prompt": "What category does this rule belong to?",
|
|
"x-priority": "important"
|
|
},
|
|
"reporter": {
|
|
"type": "string",
|
|
"enum": [
|
|
"project-reporter",
|
|
"project-files-reporter",
|
|
"non-project-files-reporter"
|
|
],
|
|
"description": "The reporter of the rule.",
|
|
"x-prompt": "What reporter do you want to use for this rule?",
|
|
"x-priority": "important"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "The description of the rule.",
|
|
"x-prompt": "What is the description of the rule?",
|
|
"x-priority": "important"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": ["name", "directory", "category", "reporter"],
|
|
"presets": []
|
|
},
|
|
"description": "Create a new conformance rule",
|
|
"implementation": "/libs/nx-packages/powerpack-conformance/src/generators/create-rule/create-rule.ts",
|
|
"aliases": [],
|
|
"hidden": false,
|
|
"path": "/libs/nx-packages/powerpack-conformance/src/generators/create-rule/schema.json",
|
|
"type": "generator"
|
|
}
|