Skip to content

docs(eslint-plugin): [no-namespace] correct default and example #2876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/eslint-plugin/docs/rules/no-namespace.md
Original file line number Diff line number Diff line change
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