Skip to content

Commit

Permalink
Remove error for @typescript-eslint/no-namespace (facebook#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 facebook#7651.
  • Loading branch information
szhu authored and wombleton committed Jun 1, 2021
1 parent fe38017 commit 949e2af
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 949e2af

Please sign in to comment.