Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Commit

Permalink
[FIX] [no-namespace] allow global augmentation (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
armano2 authored and bradzacher committed Dec 11, 2018
1 parent e5644b0 commit b5c363b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/rules/no-namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ module.exports = {
return {
TSModuleDeclaration(node) {
if (
node.global ||
isTypeScriptModuleDeclaration(node) ||
(allowDefinitionFiles && isDefinitionFile()) ||
(allowDeclarations && isDeclaration(node))
Expand Down
1 change: 1 addition & 0 deletions tests/lib/rules/no-namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const ruleTester = new RuleTester({

ruleTester.run("no-namespace", rule, {
valid: [
"declare global { }",
"declare module 'foo' { }",
{
code: "declare module foo { }",
Expand Down

0 comments on commit b5c363b

Please sign in to comment.