Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 29, 2025

ESLint 9 requires the new flat config format. The old .eslintrc JSON format is no longer supported.

Changes

  • New eslint.config.js using flat config structure with @eslint/js and globals packages
  • Removed .eslintrc (deprecated format)
  • Migrated deprecated rules:
    • no-spaced-funcfunc-call-spacing
    • Removed rules no longer in ESLint 9: handle-callback-err, no-catch-shadow, no-native-reassign, newline-after-var, no-reserved-keys, no-wrap-func

Config structure

const globals = require( 'globals' );
const js = require( '@eslint/js' );

module.exports = [
  js.configs.recommended,
  {
    languageOptions: {
      sourceType: 'commonjs',
      ecmaVersion: 2021,
      globals: {
        ...globals.node,
        arguments: 'writable',
      },
    },
    rules: {
      // all existing rules preserved
    },
  },
];

Note: No additional devDependencies needed - @eslint/js and globals are now provided by dotest.

Original prompt

Convert the current old ESlint config to the new config format. Create a PR with the changes.


💡 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.

@coveralls
Copy link

coveralls commented Nov 29, 2025

Coverage Status

coverage: 100.0%. remained the same
when pulling f44c56f on copilot/convert-eslint-config-format
into 7e1f701 on develop.

…rmat

Co-authored-by: fvdm <93784+fvdm@users.noreply.github.com>
Copilot AI changed the title [WIP] Convert old ESLint config to new config format Convert ESLint config to flat config format Nov 29, 2025
Copilot AI requested a review from fvdm November 29, 2025 19:58
@fvdm
Copy link
Owner

fvdm commented Nov 30, 2025

@copilot Run the test again that required the firewall changes

Copy link
Contributor Author

Copilot AI commented Nov 30, 2025

@copilot Run the test again that required the firewall changes

Tests ran successfully - network access to www.googleapis.com is now working. ESLint with the new flat config shows 0 errors (1 pre-existing warning about unused eslint-disable directive in example.js).

The API tests reach Google's servers now but fail due to missing/invalid API key (expected without KEY env var). Error handling test (3/3) passes correctly.

@fvdm
Copy link
Owner

fvdm commented Nov 30, 2025

@copilot I have updated the 'dotest' dev dep for better ESLint v9 support. Please re-run your tests. Also I think the dev dep changes in the package.json are now no longer needed.

… in dotest)

Co-authored-by: fvdm <93784+fvdm@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 30, 2025

@copilot I have updated the 'dotest' dev dep for better ESLint v9 support. Please re-run your tests. Also I think the dev dep changes in the package.json are now no longer needed.

Tests re-run with dotest 2.14.2 - ESLint works correctly with the flat config. Removed @eslint/js and globals from devDependencies since dotest now includes them (commit f44c56f).

@fvdm fvdm marked this pull request as ready for review November 30, 2025 01:10
@fvdm fvdm merged commit 52cdb59 into develop Nov 30, 2025
16 checks passed
@fvdm fvdm deleted the copilot/convert-eslint-config-format branch November 30, 2025 01:11
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.

3 participants