Closed IlyaSemenov closed 6 years ago
What version of TypeScript are you using? 2.8.3
What version of typescript-eslint-parser are you using? 15.0.0
typescript-eslint-parser
What code were you trying to parse?
index.d.ts:
index.d.ts
declare global { interface Process { client: boolean server: boolean } }
or
declare namespace NodeJS { interface Process { client: boolean server: boolean } }
with:
rules: { 'typescript/no-namespace': 'error', },
What did you expect to happen? No errors.
What happened? error ES2015 module syntax is preferred over custom TypeScript modules and namespaces typescript/no-namespace
error ES2015 module syntax is preferred over custom TypeScript modules and namespaces typescript/no-namespace
There was a similar issue in tslint - https://github.com/palantir/tslint/issues/3157 - and it was fixed.
Thanks @IlyaSemenov, issues related to custom rules in the plugin should be reported there: https://github.com/nzakas/eslint-plugin-typescript
The rule will need to be updated.
What version of TypeScript are you using? 2.8.3
What version of
typescript-eslint-parser
are you using? 15.0.0What code were you trying to parse?
index.d.ts
:or
with:
What did you expect to happen? No errors.
What happened?
error ES2015 module syntax is preferred over custom TypeScript modules and namespaces typescript/no-namespace
There was a similar issue in tslint - https://github.com/palantir/tslint/issues/3157 - and it was fixed.