Skip to content

React Testing lesson: share the eslint config for globals - #31325

Closed
XAJX179 wants to merge 2 commits into
TheOdinProject:mainfrom
XAJX179:patch-11
Closed

React Testing lesson: share the eslint config for globals#31325
XAJX179 wants to merge 2 commits into
TheOdinProject:mainfrom
XAJX179:patch-11

Conversation

@XAJX179

@XAJX179 XAJX179 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Because

lesson talks about extra eslint config for globals but doesn't share it, it's just one line config change to stop it yelling so i think it should be included in lesson.

This PR

  • adds the config snippet and links to the doc

Issue

Closes #XXXXX

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

@github-actions github-actions Bot added the Content: React Involves the React course label Aug 20, 2026
@mao-sz

mao-sz commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Huh, TIL that globals changed their stance on adding new environments as of 2 years ago (sindresorhus/globals#82).

I'm actually still going to close this one though, but thank you for the PR nonetheless.
Even if it's just a 1-2 line config change, we don't need to list every possible resolution. The current wording also says "the most straightforward resolution" for explicit importing and I personally stand by that because that gives you clear knowledge where identifiers are coming from (so they're not just magic globals) but also give you type information because the LSP can read the imports and Vitest's type files. As true globals, they'll literally just be globals typed as any. This reasoning isn't necessary for the lesson to go into though.

@mao-sz mao-sz closed this Aug 20, 2026
@XAJX179
XAJX179 deleted the patch-11 branch August 20, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content: React Involves the React course

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants