mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-01-12 08:54:18 +08:00
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.
This commit is contained in:
@@ -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',
|
||||
|
||||
7
test/fixtures/typescript/src/App.ts
vendored
7
test/fixtures/typescript/src/App.ts
vendored
@@ -27,4 +27,11 @@ function propertyDecorator(target: any, key: string) {
|
||||
};
|
||||
}
|
||||
|
||||
declare namespace MyNamespace {
|
||||
interface MyType {
|
||||
foo: string;
|
||||
bar: (n: number) => void;
|
||||
}
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
||||
Reference in New Issue
Block a user