Skip to content

Upgrade eslint and use flat config#7786

Open
zoran995 wants to merge 2 commits intomainfrom
upgrade-eslint
Open

Upgrade eslint and use flat config#7786
zoran995 wants to merge 2 commits intomainfrom
upgrade-eslint

Conversation

@zoran995
Copy link
Collaborator

What this PR does

Migrate to eslint flat config as eslint removed support for legacy configs in v10.

Test me

How should reviewers test this? (Hint: If you want to provide a test catalog item, create a Gist of its catalog JSON, add its url and your branch name to this url: http://ci.terria.io/<branch name>/#clean&<raw url of your gist> , and then paste that in the body of this PR)

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

/*eslint-env node*/
/*eslint no-sync: 0*/
/* eslint-disable @typescript-eslint/no-require-imports */

Copy link
Contributor

Choose a reason for hiding this comment

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

ESLint 9 automatically warns for --report-unused-disable-directives, so that parameter could possibly be dropped from the lint function below.

{
name: "terriajs/include-files",
files: [
"**/*.jsx",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I measured runtime when I did the ESLint 9 config, and "**/*.{jsx,tsx,js,ts,cjs,mjs}" (no spaces after the commas) is faster than a list of multiple globs.

@TerriaJS TerriaJS deleted a comment from pjonsson Feb 25, 2026
@zoran995 zoran995 requested review from ljowen and na9da February 27, 2026 08:16
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