Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !7179

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

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/andyhopp/master into master Jun 06, 2019
  • Overview 5
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: andyhopp

This PR resolves #7167 (closed) by disabling the no-undef rule for typescript-eslint. As pointed out in https://github.com/typescript-eslint/typescript-eslint/issues/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
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/andyhopp/master