Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabled Typescript no-undef rule per typescript-eslint #477 #7179

Merged
merged 1 commit into from
Jun 6, 2019

Conversation

andyhopp
Copy link
Contributor

@andyhopp andyhopp commented Jun 6, 2019

This PR resolves #7167 by disabling the no-undef rule for typescript-eslint. As pointed out in typescript-eslint/typescript-eslint#477, no-undef is handled by the Typescript compiler.

I have verified that errors are thrown by taking the example in the above issue and mangling the name of the namespace to "connect0" and verifying that compiler errors are thrown:

Failed to compile.

/Users/andyhopp/Projects/connect-react-example/src/connect-service.ts
TypeScript error in /Users/andyhopp/Projects/connect-react-example/src/connect-service.ts(6,9):
Cannot find name 'connect0'. Did you mean 'Connect'?  TS2552

    4 | 
    5 |     public initialize(ccpElement: HTMLElement, options: connect.InitCCPOptions) {
  > 6 |         connect0.core.initCCP(ccpElement, options);
      |         ^
    7 |         console.log('CCP Initialized!');
    8 |     }
    9 | }


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! connect-react-example@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the connect-react-example@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/andyhopp/.npm/_logs/2019-06-06T15_36_52_376Z-debug.log

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@Timer Timer merged commit 56d1de2 into facebook:master Jun 6, 2019
@Timer
Copy link
Contributor

Timer commented Jun 6, 2019

Thanks!

@iansu iansu added this to the 3.0.2 milestone Jun 6, 2019
@lock lock bot locked and limited conversation to collaborators Jun 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typescript: ambient declaration file that declares a namespace results in build errors
4 participants