mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 21:03:03 -05:00
fix: change forbid enum markdown (#908)
This commit is contained in:
@@ -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.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user