From b19bffe11047a059d8d518ac09ad8b7c6922291b Mon Sep 17 00:00:00 2001 From: Sean Zhu Date: Fri, 6 Dec 2019 12:44:22 -0800 Subject: [PATCH] Remove error for @typescript-eslint/no-namespace (#7803) Declare namespaces are supported by babel now, and babel will throw with a nice error message for non-declare namespaces, so this rule is unnecessary. Closes #7651. --- packages/eslint-config-react-app/index.js | 1 - test/fixtures/typescript/src/App.ts | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js index 68959e165af..0d29e7995a6 100644 --- a/packages/eslint-config-react-app/index.js +++ b/packages/eslint-config-react-app/index.js @@ -81,7 +81,6 @@ module.exports = { '@typescript-eslint/consistent-type-assertions': 'warn', 'no-array-constructor': 'off', '@typescript-eslint/no-array-constructor': 'warn', - '@typescript-eslint/no-namespace': 'error', 'no-use-before-define': 'off', '@typescript-eslint/no-use-before-define': [ 'warn', diff --git a/test/fixtures/typescript/src/App.ts b/test/fixtures/typescript/src/App.ts index 665f8b49f1f..ee9276a699a 100644 --- a/test/fixtures/typescript/src/App.ts +++ b/test/fixtures/typescript/src/App.ts @@ -27,4 +27,11 @@ function propertyDecorator(target: any, key: string) { }; } +declare namespace MyNamespace { + interface MyType { + foo: string; + bar: (n: number) => void; + } +} + export default App;