Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1ef0d64

Browse files
docs(eslint-plugin): [no-namespace] correct default and example (typescript-eslint#2876)
1 parent 53dc34d commit 1ef0d64

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/eslint-plugin/docs/rules/no-namespace.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ or more of the following you may pass an object with the options set as follows:
1818
- `allowDefinitionFiles` set to `true` will allow you to `declare` and use custom TypeScript modules and namespaces
1919
inside definition files (Default: `true`).
2020

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

2323
```ts
2424
module foo {}
2525
namespace foo {}
2626

2727
declare module foo {}
2828
declare namespace foo {}
29-
30-
// anything inside a d.ts file
3129
```
3230

33-
Examples of **correct** code for the default `{ "allowDeclarations": false, "allowDefinitionFiles": false }` options:
31+
Examples of **correct** code for the default `{ "allowDeclarations": false, "allowDefinitionFiles": true }` options:
3432

3533
```ts
3634
declare module 'foo' {}
35+
36+
// anything inside a d.ts file
3737
```
3838

3939
### `allowDeclarations`

0 commit comments

Comments
 (0)