Skip to content

Commit 08ce0b4

Browse files
szhujoeycozza
authored andcommitted
Remove error for @typescript-eslint/no-namespace (facebook#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 facebook#7651.
1 parent 5cad354 commit 08ce0b4

File tree

2 files changed

+7
-1
lines changed
  • packages/eslint-config-react-app
  • test/fixtures/typescript/src

2 files changed

+7
-1
lines changed

packages/eslint-config-react-app/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ module.exports = {
8181
'@typescript-eslint/consistent-type-assertions': 'warn',
8282
'no-array-constructor': 'off',
8383
'@typescript-eslint/no-array-constructor': 'warn',
84-
'@typescript-eslint/no-namespace': 'error',
8584
'no-use-before-define': 'off',
8685
'@typescript-eslint/no-use-before-define': [
8786
'warn',

test/fixtures/typescript/src/App.ts

+7
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,11 @@ function propertyDecorator(target: any, key: string) {
2727
};
2828
}
2929

30+
declare namespace MyNamespace {
31+
interface MyType {
32+
foo: string;
33+
bar: (n: number) => void;
34+
}
35+
}
36+
3037
export default App;

0 commit comments

Comments
 (0)