Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to ESLint 9.20.1 #7437

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

pjonsson
Copy link
Contributor

@pjonsson pjonsson commented Jan 2, 2025

What this PR does

Depends on: #7411, #7382, #7381

Update to ESLint 9 since
ESLint 8 reached end-of-life
on 2024-10-05 and is no longer
maintained.

The main part of this PR is
the new flat configuration
file, which is quite close to
a 1:1 migration of the previous
non-flat config. The majority
of lines is the rules section,
which is the same as before
except for the now deprecated
rules that I removed.

Test me

Run yarn gulp lint.

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.

"0",
"--report-unused-disable-directives"
]);
runExternalModule(eslintExecutable, ["lib", "test", "--max-warnings", "0"]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ESLint 9 complains about unused directives even without the parameter, so drop the parameter.

The globs in the config decide what files are matched, so I dropped the --ext parameter as well. If we add an ESLint plugin that lints scss files in the future, that should work without modifications of the gulpfile.

"react/no-danger": "warn",
"react/no-did-update-set-state": "error",
"react/no-will-update-set-state": "error",
"react/prop-types": "error",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The react/prop-types was disabled in #7382 (comment), but apparently doesn't trigger 1400+ warnings in ESLint 9, so re-enable the rule.

Update to ESLint 9 since
ESLint 8 reached end-of-life
on 2024-10-05 and is no longer
maintained.

The main part of this PR is
the new flat configuration
file, which is quite close to
a 1:1 migration of the previous
non-flat config. The majority
of lines is the rules section,
which is the same as before
except for the now deprecated
rules that I removed.
pjonsson added a commit to pjonsson/TerriaMap that referenced this pull request Feb 19, 2025
Update to ESLint 9 since
ESLint 8 reached end-of-life
on 2024-10-05 and is no longer
maintained.

This is the TerriaMap part of
TerriaJS/terriajs#7437
@pjonsson pjonsson changed the title Update to ESLint 9.17.0 Update to ESLint 9.20.1 Feb 19, 2025
pjonsson added a commit to pjonsson/TerriaMap that referenced this pull request Feb 20, 2025
Update to ESLint 9 since
ESLint 8 reached end-of-life
on 2024-10-05 and is no longer
maintained.

This is the TerriaMap part of
TerriaJS/terriajs#7437
@pjonsson
Copy link
Contributor Author

The corresponding TerriaMap PR is TerriaJS/TerriaMap#732

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.

1 participant