Skip to content

Commit

Permalink
docs(eslint-plugin): [no-namespace] correct default and example (#2876)
Browse files Browse the repository at this point in the history
  • Loading branch information
trevinhofmann committed Dec 16, 2020
1 parent 53dc34d commit 1ef0d64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/eslint-plugin/docs/rules/no-namespace.md
Expand Up @@ -18,22 +18,22 @@ or more of the following you may pass an object with the options set as follows:
- `allowDefinitionFiles` set to `true` will allow you to `declare` and use custom TypeScript modules and namespaces
inside definition files (Default: `true`).

Examples of **incorrect** code for the default `{ "allowDeclarations": false, "allowDefinitionFiles": false }` options:
Examples of **incorrect** code for the default `{ "allowDeclarations": false, "allowDefinitionFiles": true }` options:

```ts
module foo {}
namespace foo {}

declare module foo {}
declare namespace foo {}

// anything inside a d.ts file
```

Examples of **correct** code for the default `{ "allowDeclarations": false, "allowDefinitionFiles": false }` options:
Examples of **correct** code for the default `{ "allowDeclarations": false, "allowDefinitionFiles": true }` options:

```ts
declare module 'foo' {}

// anything inside a d.ts file
```

### `allowDeclarations`
Expand Down

0 comments on commit 1ef0d64

Please sign in to comment.