create-react-app enforces @typescript-eslint/no-namespace, a style rule
Created by: szhu
Describe the bug
create-react-app --typescript
- Add a
namespace
in a file - I get the error:
ES2015 module syntax is preferred over custom TypeScript modules and namespaces.eslint(@typescript-eslint/no-namespace)
. There seems to be no way to turn off this rule, according to #3886 (closed).
Why this is a bug:
From https://github.com/facebook/create-react-app/issues/2157#issuecomment-301452953:
Our rules are specifically picked to not enforce style, and to only find logical mistakes.
Whether or not a namespace is used is most definitely not a choice of style and not a logical mistake. Please remove this rule or give me an option to remove this rule.