fix: change forbid enum markdown (#908)

This commit is contained in:
J. Degand
2024-05-15 08:36:45 -04:00
committed by GitHub
parent 49a1148cb1
commit 008051cab8

View File

@@ -18,9 +18,9 @@ In this first example, we will create a rule that forbids the use of enums. The
You will also need to write tests to verify the rule's functionality. You will also need to write tests to verify the rule's functionality.
The `tools/eslint-rules` folder contains the starter code for this challenge. The starter code for this challenge can be found (from the root folder) inside `tools/eslint-rules/rules`.
To test the rule inside your project, add `"@nrwl/nx/workspace/forbidden-enum": "error"` to the `eslintrc.json`. You can navigate to Challenge 47, `Enums vs. Union Types', and you should immediately see an error. To test the rule inside your project, add `"@nx/workspace/forbidden-enum": "error"` to the `eslintrc.json`. You can navigate to Challenge 47, `Enums vs. Union Types', and you should immediately see an error.
To assist you with AST (Abstract Syntax Tree) definitions, you can visit the [AST Explorer](https://astexplorer.net/) and use `JavaScript`, `@typescript-eslint/parser`, and `ESLint-v8` as the transformation methods. However, please note that you will only get the `type` information there. The transformation function may not work for TypeScript types since the editor is in JavaScript. To assist you with AST (Abstract Syntax Tree) definitions, you can visit the [AST Explorer](https://astexplorer.net/) and use `JavaScript`, `@typescript-eslint/parser`, and `ESLint-v8` as the transformation methods. However, please note that you will only get the `type` information there. The transformation function may not work for TypeScript types since the editor is in JavaScript.