Skip to content

Commit

Permalink
Remove error for @typescript-eslint/no-namespace (#7803)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
szhu authored and heyimalex committed Dec 6, 2019
1 parent 8330e7c commit b19bffe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/eslint-config-react-app/index.js
Expand Up @@ -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',
Expand Down
7 changes: 7 additions & 0 deletions test/fixtures/typescript/src/App.ts
Expand Up @@ -27,4 +27,11 @@ function propertyDecorator(target: any, key: string) {
};
}

declare namespace MyNamespace {
interface MyType {
foo: string;
bar: (n: number) => void;
}
}

export default App;

0 comments on commit b19bffe

Please sign in to comment.