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
  • !8666

fix(eslint-config-react-app): adjust TS override pattern to match files outside of current working directory

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/pieh/ecra-ts-outside-cwd into master Mar 17, 2020
  • Overview 6
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: pieh

I'll start with that this is speculative pull request. I didn't find issue related to it, but given minimal code change I figured I might as well start with change proposal.

I'm not exactly sure how intentional it is currently for pattern to start with globstar here (initial pull request for TS support in this eslint preset already had it - https://github.com/facebook/create-react-app/pull/6513) and later on there were just few changes that unified it a bit, but didn't touch **/ part of pattern.

Impact that **/ prefix has is that eslint will not match files if they are outside of cwd. This can happen if you are working with yarn workspaces and your setup doesn't compile TS files and leave them as is.

Please check https://runkit.com/pieh/5e7150eb43c9c70019a74c16 for very simplified illustration of problematic scenario (with some parts of eslint inlined there with links to source), so it's easier to see what's going on. You can play with override pattern there to see that "TS path outside project directory" match changes when you remove **/ prefix from false to true

Ref: Issue on gatsbyjs/gatsby about TS linting in workspaces

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/pieh/ecra-ts-outside-cwd