Skip to content
GitLab
    • Explore Projects Groups Snippets
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
  • !4818

Change severity of no-restricted-globals to warn

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/silverwind/restricted-globals-warning into next 7 years ago
  • Overview 5
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: silverwind

Sometimes, it is intended to access browser globals like location, so we change the severity of this rule to warn which allows the app to still start in presence of such an lint issue.

Approval is optional

Closed by (Jul 25, 2025 6:57am UTC)

Merge details

  • The changes were not merged into next.

Activity


  • Administrator
    Administrator @root · 7 years ago
    Author Contributor

    Created by: facebook-github-bot

    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!

  • Administrator added CLA Signed label 7 years ago

    added CLA Signed label

  • Administrator
    Administrator @root · 7 years ago
    Author Contributor

    Created by: facebook-github-bot

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

  • Administrator
    Administrator @root · 7 years ago
    Author Contributor

    Created by: Timer

    You can access this by prefixing the variable with window, we're not gonna be changing this.

    Thanks for the PR though!

  • Administrator closed 7 years ago

    closed

  • Administrator
    Administrator @root · 7 years ago
    Author Contributor

    Created by: silverwind

    Yes, I knew about prefixing with window, but I think it is uneccessarily noisy to do so.

    we're not gonna be changing this

    Why thought? It's certainly not an "error" to access thing like location.pathname, is it? To me, this seems like a very opinionated configuration, certainly not "minimal" as describted in the docs.

  • Administrator
    Administrator @root · 7 years ago
    Author Contributor

    Created by: Timer

    See the motivations on the package.

Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
1
CLA Signed
1
CLA Signed
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference: facebook/create-react-app!4818
Source branch: github/fork/silverwind/restricted-globals-warning

Menu

Explore Projects Groups Snippets