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

Migrate to ESLint flat config for CI tests #529

Closed
MikeMcC399 opened this issue Oct 17, 2024 · 5 comments · Fixed by #576
Closed

Migrate to ESLint flat config for CI tests #529

MikeMcC399 opened this issue Oct 17, 2024 · 5 comments · Fixed by #576
Assignees

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Oct 17, 2024

What would you like?

Migrate tests running in .github/workflows/ci.yml to use ESLint flat configuration.

Why is this needed?

  1. The script lint, used in CI, relies on running eslint.
  2. The configuration for ESLint is contained in .eslintrc.cjs which is a standard configuration for ESLint v8.
  3. ESLint configuration .eslintrc is deprecated in ESLint v9 and is planned to be removed in ESLint v10.
  4. ESLint v8 support ceased on Oct 5, 2024.
  5. ESLint flat configuration is the standard for ESLint v9 and later.
  6. To ensure future support for internal linting of this repo, the deprecated .eslintrc.cjs configuration needs to be replaced by a flat configuration.

Other

Module Original Flat prerequisite Current
eslint 8.33.0 8.57.1 8.57.1
eslint-plugin-square 24.0.0 unavailable removed
eslint-plugin-node 11.1.0 unmaintained eslint-plugin-n@17.11.1
eslint-plugin-unicorn 45.0.2 >= 50.0.0 56.0.0
eslint-plugin-jest 27.2.1 >= 27.9.0 27.9.0
@typescript-eslint/eslint-plugin 5.52.0 >= 7.0.0
@typescript-eslint/parser 5.52.0 >= 7.0.0
@typescript-eslint/utils 5.52.0 >= 7.0.0

Comments

  1. eslint should be updated to the latest 8.* version to avoid any resolved issues supporting flat configurations in ESLint v8. Edit: done with PR chore(deps): update eslint to 8.57.1 #530
  2. eslint-plugin-square says "It is generally not recommended for public usage outside of Square." and this plugin offers no support for flat configurations. Edit: done with PR chore(deps): replace eslint-plugin-square #539
  3. eslint-plugin-node states "This project has been no longer maintained. Please consider to use https://github.com/eslint-community/eslint-plugin-n." Edit: done with PR chore(deps): migrate to eslint-plugin-n@17.11.1 #540
@MikeMcC399
Copy link
Contributor Author

@ddzz
Copy link
Collaborator

ddzz commented Oct 21, 2024

I would recommend removing eslint-plugin-square entirely. Per its README, it's not meant for use in projects outside of Square's organization.

@MikeMcC399
Copy link
Contributor Author

@ddzz

I would recommend removing eslint-plugin-square entirely. Per its README, it's not meant for use in projects outside of Square's organization.

Thank you for your guidance!

I guess it's no coincidence that eslint-plugin-square@24.0.0 currently used in this repo was released by @bmish, who was apparently working at Square at that time. I assume that this was done for convenience.

There are two issues mentioned in the original post supporting the removal:

  • eslint-plugin-square says "It is generally not recommended for public usage outside of Square." and this plugin offers no support for flat configurations.

Removing eslint-plugin-square, whilst preserving the linting functioning it was providing, requires adding back some other ESLint plugins it uses.

@MikeMcC399
Copy link
Contributor Author

@ddzz

I would recommend removing eslint-plugin-square entirely. Per its README, it's not meant for use in projects outside of Square's organization.

@MikeMcC399
Copy link
Contributor Author

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 a pull request may close this issue.

3 participants