opened
ExE-Boss
username_0
Fixes <https://github.com/microsoft/dtslint/issues/281>

## Depends on:
- [ ] <https://github.com/DefinitelyTyped/DefinitelyTyped/pull/45148>
chore(deps): Move `typescript` to `peerDependencies`
issue
created
sandersn
username_1
I think it's actually the fault of dtslint's dependencies dts-critic and @definitelytyped/definitions-parser. dtslint needs to depend directly on typescript so that it can be run via package.json's `bin` entry.
comment
created
ExE-Boss
username_0
That will also work with peer dependencies.
comment
created
sandersn
username_1
https://github.com/microsoft/dtslint/pull/296 updated dtslint's dependencies. I published it and will watch DT to see if it works.
comment
created
sandersn
username_1
(It works locally.)
comment
created
Maxim-Mazurok
username_2
That doesn't seem to be the case. Even with latest `dtslint`, I still can reproduce the issue.
Here's what happens:
- I have `typescript@3.9.0-dev.20200321` as a dependency of my project.
- I'm running `dtslint`
- `dtslint` imports and calls `tslint`
- `tslint` doesn't have `typescript` dependency, so it uses my projects version to parse ts files and convert them into linkable structure
- `dtslint` rule `voidReturnRule` also imports `typescript` but since `dtslint` has `typescript` dependency, it uses local ts version which has different enum values

Here's an illustration:
![dtslint](https://user-images.githubusercontent.com/7756211/83322203-03764500-a299-11ea-9c0b-47ade00635bf.png)
comment
created
Maxim-Mazurok
username_2
I just tried this fork (PR) on my project using `npm link` and it worked perfectly!
I was running it using `bin` like so:
```sh
./node_modules/.bin/dtslint types/gapi.client.abusiveexperiencereport
```
comment
created
sandersn
username_1
OK, 3.6.10 is published, let me know if there are problems.
comment
created
IvanGoncharov
username_3
@username_1 It fixed every for `graphql-js`.
The next challenge is to understand why our typing is failing `strict-export-declare-modifiers` but I think it is a different bug.
comment