Skip to content

Migrate eslint config to 9.x#2262

Merged
nhsd-david-wass merged 2 commits intodevelopfrom
feature/ERSSUP-84813
May 8, 2025
Merged

Migrate eslint config to 9.x#2262
nhsd-david-wass merged 2 commits intodevelopfrom
feature/ERSSUP-84813

Conversation

@nhsd-david-wass
Copy link
Copy Markdown
Contributor

Summary

  • Routine Change
  • ❗ Breaking Change
  • 🤖 Operational or Infrastructure Change
  • ✨ New Feature
  • ⚠️ Potential issues that might be caused by this change

Add any other relevant notes or explanations here. Remove this line if you have nothing to add.

Reviews Required

  • Dev
  • Test
  • Tech Author
  • Product Owner

Review Checklist

ℹ️ This section is to be filled in by the reviewer.

  • I have reviewed the changes in this PR and they fill all or part of the acceptance criteria of the ticket, and the code is in a mergeable state.
  • If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
  • I have ensured the changelog has been updated by the submitter, if necessary.

Copy link
Copy Markdown
Contributor

@francisco-videira-nhs francisco-videira-nhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of questions:

  1. I wonder if we can delete the .eslintrc.js now?
  2. Was the new config file created via the migration tool? (I left a comment with more detail in the file.)
  3. I wonder if it's worth doing some manual testing by perhaps changing in some files and checking if the linter is working as expected, as this won't otherwise be tested?

Comment thread sandbox/eslint.config.mjs Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this was created via npx @eslint/migrate-config .eslintrc.json? I got a different result on my end. But seems to be fairly similar. I got a eslint.config.js (as opposed to .mjs)

const {
    defineConfig,
} = require("eslint/config");

const globals = require("globals");

module.exports = defineConfig([{
    languageOptions: {
        globals: {
            ...globals.commonjs,
            ...globals.node,
            "Atomics": "readonly",
            "SharedArrayBuffer": "readonly",
        },

        "ecmaVersion": 2018,
        parserOptions: {},
    },

    "extends": "eslint:recommended",
    "rules": {},
}]);

Bumps [eslint](https://github.com/eslint/eslint) from 8.57.0 to 9.0.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.57.0...v9.0.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@nhsd-david-wass nhsd-david-wass force-pushed the feature/ERSSUP-84813 branch from fa07581 to 137724c Compare May 7, 2025 14:05
Copy link
Copy Markdown
Contributor

@francisco-videira-nhs francisco-videira-nhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just a minor comment on commented out lines.

Comment thread sandbox/eslint.config.js Outdated
Comment on lines +3 to +4
//import js from "@eslint/js";
//import globals from "globals";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if these can be taken out?

@nhsd-david-wass nhsd-david-wass force-pushed the feature/ERSSUP-84813 branch from 137724c to 0f14abd Compare May 8, 2025 09:07
Copy link
Copy Markdown
Contributor

@francisco-videira-nhs francisco-videira-nhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@nhsd-david-wass nhsd-david-wass merged commit 67fef39 into develop May 8, 2025
4 checks passed
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