Skip to content

[WIP] Update eslint.config.js for compatibility with ESLint v10 - #101

Merged
Isaloum merged 2 commits into
dependabot/npm_and_yarn/eslint-10.0.0from
copilot/update-eslint-config-v10
Feb 10, 2026
Merged

[WIP] Update eslint.config.js for compatibility with ESLint v10#101
Isaloum merged 2 commits into
dependabot/npm_and_yarn/eslint-10.0.0from
copilot/update-eslint-config-v10

Conversation

Copilot AI commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

ESLint v10 Compatibility Fix

Plan:

  • Update eslint.config.js to add explicit files pattern for ESLint v10
  • Test the lint command locally to ensure it works
  • Verify no regressions in linting behavior

Changes Made:

  • Added files: ['**/*.js', '**/*.mjs'] to eslint.config.js
  • Updated comment to reflect ESLint v10+ compatibility
  • Verified linting runs successfully with 0 errors (only expected warnings)
Original prompt

Problem

The CI is failing in PR #99 which upgrades ESLint from 9.39.2 to 10.0.0. The error occurs during the lint step:

at Object.format (/home/runner/work/TaxSyncForDrivers/TaxSyncForDrivers/node_modules/eslint/lib/eslint/eslint.js:1271:12)
at printResults (/home/runner/work/TaxSyncForDrivers/TaxSyncForDrivers/node_modules/eslint/lib/cli.js:118:33)
Process completed with exit code 2.

Root Cause

ESLint v10 has breaking changes that require updates to the flat config format. The current eslint.config.js is using the minimal ESLint v9 format and needs to be updated to be fully compatible with ESLint v10's stricter requirements.

Solution Required

Update eslint.config.js to be compatible with ESLint v10 by:

  1. Add explicit files patterns to match JavaScript files
  2. Update the config structure to use proper ESLint v10 flat config format
  3. Ensure globals are properly scoped to the files that need them

Updated eslint.config.js

// Flat config for ESLint v10+
export default [
  {
    ignores: [
      'index.html',
      '*.html',
      'dist/',
      'build/',
      'node_modules/',
      'coverage/',
      'coverage/**',
      'coverage/lcov-report/**',
      '.nyc_output/',
      'TaxSyncQC/',
    ],
  },
  {
    files: ['**/*.js', '**/*.mjs'],
    languageOptions: {
      ecmaVersion: 2021,
      sourceType: 'module',
      globals: {
        _: 'readonly',
        getFormData: 'readonly',
        TaxCalculator: 'readonly',
        lastCalculationData: 'writable',
        test: 'readonly',
      },
    },
    rules: {
      'no-unused-vars': [
        'warn',
        {
          argsIgnorePattern: '^_',
          varsIgnorePattern: '^_',
          caughtErrorsIgnorePattern: '^_',
        },
      ],
      'no-console': 'off',
    },
  },
];

Key Changes

  1. Added files: ['**/*.js', '**/*.mjs'] pattern to explicitly define which files to lint
  2. This is required in ESLint v10 when using the flat config format

Testing

After applying this fix:

  • The lint step should pass in CI
  • ESLint v10 will properly recognize the configuration
  • All JavaScript files will be linted correctly

References

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Isaloum <155708736+Isaloum@users.noreply.github.com>
@Isaloum
Isaloum marked this pull request as ready for review February 10, 2026 00:58
@Isaloum
Isaloum merged commit f2c4ea2 into dependabot/npm_and_yarn/eslint-10.0.0 Feb 10, 2026
Copilot AI requested a review from Isaloum February 10, 2026 00:59
Copilot stopped work on behalf of Isaloum due to an error February 10, 2026 00:59
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