Skip to content

Commit

Permalink
docs(eslint-plugin): correct no-magic-number docs (#717)
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 authored and bradzacher committed Jul 18, 2019
1 parent 66f9741 commit 6be0d81
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/eslint-plugin/docs/rules/no-magic-numbers.md
Expand Up @@ -45,20 +45,20 @@ type SmallPrimes = 2 | 3 | 5 | 7 | 11;

A boolean to specify if enums used in Typescript are considered okay. `false` by default.

Examples of **incorrect** code for the `{ "ignoreEnum": false }` option:
Examples of **incorrect** code for the `{ "ignoreEnums": false }` option:

```ts
/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreEnum": false }]*/
/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreEnums": false }]*/

enum foo = {
SECOND = 1000,
}
```

Examples of **correct** code for the `{ "ignoreEnum": true }` option:
Examples of **correct** code for the `{ "ignoreEnums": true }` option:

```ts
/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreEnum": true }]*/
/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreEnums": true }]*/

enum foo = {
SECOND = 1000,
Expand Down

0 comments on commit 6be0d81

Please sign in to comment.