-
-
Notifications
You must be signed in to change notification settings - Fork 75
Undefined warnings for variables in ref files #208
Comments
We do not currently parse reference files. If we did we would still need an eslint plugin rule to parse the typing declarations and add them to the global scope. This could be done in the future. A workaround would be to use an import statement instead of the reference file. For example: import * as BABYLON from 'babylonjs'; If you get a warning about no types found you can install them but it looks like the library might come with type definitions already. Since typescript 2.0 these typing files are loaded by default and the reference line is no longer needed. |
Thanks, originally I used |
There are some other errors with no-undef, when using interfaces, that cause false positives. So it would be best to leave it off. Typescript compiler has built in handling of no undefined parameters and local variables with noUnusedLocals and noUnusedParameters. You can check this issue for other problems with eslint rules and this typescript parser: |
I might just use this https://github.com/blakeembrey/tslint-config-standard |
I'm not sure if it uses this lib or not. |
I think that uses tslint, which is a great linter as well just has less rules and configuration options. Eslint still needs some more work to allow for all the current rules to work. This is being worked on and will continue to get better. |
Okay I will stick with the status quo on this project
--
Kind regards
Nikos
quantumjs.com
|
I'm going to close this due to lack of activity. We now have a brand new way of running integration tests for this project, which allows for complex setups to be reproduced in isolation: https://github.com/eslint/typescript-eslint-parser#integration-tests If this is still an issue for you using the latest version, please create a failing integration test for it and open a new issue to discuss. Thanks! |
What version of TypeScript are you using?
2.1.4
What version of
typescript-eslint-parser
are you using?^2.0.0
What code were you trying to parse?
https://github.com/QuantumInformation/Density-Wars/blob/master/client/Game.ts
What did you expect to happen?
Have no warnings for variables declared in REF declarations: (BABYLON )
https://github.com/QuantumInformation/Density-Wars/blob/master/client/Game.ts#L1
What happened?

warnings about BABYLON like
The text was updated successfully, but these errors were encountered: