Skip to content

fix: migrate ESLint to flat config and resolve no-unused-vars errors#530

Open
suculent wants to merge 29 commits intomasterfrom
lint-fix/eslint-config-migration
Open

fix: migrate ESLint to flat config and resolve no-unused-vars errors#530
suculent wants to merge 29 commits intomasterfrom
lint-fix/eslint-config-migration

Conversation

@suculent
Copy link
Copy Markdown
Owner

@suculent suculent commented Apr 20, 2026

Summary

  • Migrated ESLint configuration from legacy .eslintrc.js format to flat config eslint.config.js (required for ESLint v10 which dropped the old format)
  • Removed .eslintignore (replaced by ignores array in flat config)
  • Added caughtErrorsIgnorePattern: "^_" to no-unused-vars rule (ESLint v9+ now checks catch-clause variables by default)
  • Added submodule directories to ignores so external repos are not linted
  • Prefixed 30+ unused variables with _ across 21 source files to satisfy the ^_ pattern rule
  • Removed 2 stale eslint-disable directives that were no longer needed
  • Updated npm run lint script: removed unsupported --config and --ignore-path flags (flat config is auto-detected)

Test plan

  • Run npm run lint — should exit with zero errors and zero warnings
  • Verify no functional code was changed (only variable name prefixes and comment removal)

🤖 Generated with Claude Code

Nightshift-Task: lint-fix
Nightshift-Ref: https://github.com/marcus/nightshift


Automated by nightshift

snyk-bot and others added 29 commits March 26, 2026 18:33
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-YAML-15765520
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-YAML-15765520
…into thinx-staging

* 'thinx-staging' of github.com:suculent/thinx-device-api: (64 commits)
  feat: add commit message normalizer with prepare-commit-msg hook
  fix(base): updated components
  fix(git): test run issue regarding global key
  fix: move profile handler functions into module closure to fix this.user runtime crash
  audit: add missing logging to routes and database module
  chore: add commitlint config to enforce conventional commit format
  feat: add metrics instrumentation coverage analyzer
  Update console submodule for device list fix
  version bump
  http rollback for couch
  fix: package.json to reduce vulnerabilities
  added global GIT_KEY_PASSPHRASE
  fix: remediate 6 security anti-patterns found by foot-gun analysis
  fix: correct 5 bugs identified in bug-finder analysis
  fix: remove OAuth access_token debug log leak in router.google.js
  fix: correct 5 bugs identified in bug-finder analysis
  docs: add release notes for thinx-staging
  planned improvements
  docs: add prioritized improvements backlog
  fix: resolve ESLint no-unused-vars and no-extra-semi errors
  ...

# Conflicts:
#	.circleci/config.yml
…aging

* commit '8f5de37672867f10e561935580c010a5960008b7':
  fix: package.json to reduce vulnerabilities
  fix: package.json to reduce vulnerabilities
…aging

* commit '61c2130066ffd405e634df470eff79fcc16447cf':
  fix: package.json to reduce vulnerabilities
  fix: package.json to reduce vulnerabilities
- Replace .eslintrc.js + .eslintignore with eslint.config.js (flat config)
- Add caughtErrorsIgnorePattern to no-unused-vars rule for ESLint v10
- Exclude submodule directories from linting scope
- Prefix unused catch variables with _ across 21 source files
- Prefix unused declared vars in conf/.sample_transformer.js and scripts/
- Remove stale eslint-disable directives in router.gdpr.js and worker.js
- Update npm lint script: drop --config and --ignore-path flags

Nightshift-Task: lint-fix
Nightshift-Ref: https://github.com/marcus/nightshift
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