Skip to content

Migrate to ESLint 9 and @iobroker/eslint-config#1112

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-1018-2
Draft

Migrate to ESLint 9 and @iobroker/eslint-config#1112
Copilot wants to merge 3 commits intomainfrom
copilot/fix-1018-2

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 10, 2025

This PR migrates the repository from ESLint 8.57.1 to ESLint 9.35.0 using the new standardized @iobroker/eslint-config configuration as recommended by the ioBroker core team.

Changes Made

ESLint Configuration Migration

  • Removed deprecated .eslintrc.json configuration file
  • Added new eslint.config.mjs using ESLint 9's flat config format
  • Added prettier.config.mjs for consistent code formatting
  • Updated package.json lint scripts to use the new configuration
  • Updated .npmignore to exclude new config files from npm package

Code Quality Improvements

  • Fixed 1,439 ESLint errors (reduced to 0 errors, 17 optional warnings)
  • Replaced deprecated @ts-ignore comments with @ts-expect-error
  • Fixed security issues by replacing direct hasOwnProperty calls with Object.prototype.hasOwnProperty.call()
  • Resolved unused variable errors in catch blocks
  • Applied automatic formatting fixes for quotes, indentation, and spacing

Package Updates

  • Removed eslint@8.57.1
  • Added @iobroker/eslint-config which includes ESLint 9 and all necessary plugins
  • Maintained all existing functionality and test compatibility

Results

  • ESLint Version: 9.35.0 (upgraded from 8.57.1)
  • Lint Errors: 0 (reduced from 1,439)
  • Lint Warnings: 17 (only optional JSDoc documentation improvements)
  • Tests: All 41 tests passing
  • Adapter Functionality: Confirmed working with "Successfully activated SourceAnalytix" message

The migration follows the official ioBroker ESLint migration guide and ensures compatibility with the standardized configuration used by the ioBroker core team. All remaining warnings are optional JSDoc documentation improvements that don't affect code functionality.

Fixes #1018.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits September 10, 2025 22:16
Co-authored-by: DutchmanNL <7318445+DutchmanNL@users.noreply.github.com>
Co-authored-by: DutchmanNL <7318445+DutchmanNL@users.noreply.github.com>
Copilot AI changed the title [WIP] Migration to ESLint 9 and @iobroker/eslint-config Migrate to ESLint 9 and @iobroker/eslint-config Sep 10, 2025
Copilot AI requested a review from DutchmanNL September 10, 2025 22:21
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.

Migration to ESLint 9 and @iobroker/eslint-config

2 participants