Skip to content

fix: Add localStorage and sessionStorage to ESLint globals#36

Merged
platzhersh merged 1 commit intomainfrom
claude/fix-lint-errors-fDo1y
Jan 31, 2026
Merged

fix: Add localStorage and sessionStorage to ESLint globals#36
platzhersh merged 1 commit intomainfrom
claude/fix-lint-errors-fDo1y

Conversation

@platzhersh
Copy link
Owner

@platzhersh platzhersh commented Jan 31, 2026

Summary

Updated ESLint configuration to recognize localStorage and sessionStorage as global objects, preventing "undefined variable" linting errors when these Web Storage APIs are used in the codebase.

Changes

  • Added localStorage and sessionStorage as readonly globals in the browser environment configuration
  • Added the same globals to the browser test environment configuration to ensure consistency across all browser-based linting contexts

Details

These Web Storage APIs are standard browser globals and should be recognized by ESLint to avoid false positive linting errors. By marking them as readonly, we prevent accidental reassignment while allowing their normal usage throughout the application.

https://claude.ai/code/session_01Txu5cvJEDjS6kkbf8HVSad

Summary by CodeRabbit

  • Chores
    • Updated development configuration to properly recognize browser storage APIs as global objects. This ensures consistent linting behavior across JavaScript and Vue components.

✏️ Tip: You can customize this high-level summary in your review settings.

Fixes no-undef lint errors for browser storage APIs in both
JS/TS and Vue file configurations.

https://claude.ai/code/session_01Txu5cvJEDjS6kkbf8HVSad
@platzhersh platzhersh changed the title Add localStorage and sessionStorage to ESLint globals fix: Add localStorage and sessionStorage to ESLint globals Jan 31, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 31, 2026

Walkthrough

Added localStorage and sessionStorage to readonly globals in the ESLint configuration for both JavaScript/TypeScript and Vue file blocks, ensuring these browser APIs are recognized as safe global variables during linting.

Changes

Cohort / File(s) Summary
ESLint Configuration
web/eslint.config.js
Added localStorage and sessionStorage to readonly globals for JavaScript/TypeScript and Vue file blocks to prevent ESLint warnings when using these browser storage APIs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A config tweak so clean and bright,
localStorage now in sight!
No more lints shall cry in pain,
When storage globals are plain,
The rabbit hops with pure delight! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and concisely summarizes the main change: adding localStorage and sessionStorage to ESLint globals configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/fix-lint-errors-fDo1y

Comment @coderabbitai help to get the list of available commands and usage tips.

@platzhersh platzhersh merged commit 3c5965f into main Jan 31, 2026
2 checks passed
@platzhersh platzhersh deleted the claude/fix-lint-errors-fDo1y branch January 31, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments