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

fix: eslint v9 pre-commit hook #13886

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

Swiftb0y
Copy link
Member

@Swiftb0y Swiftb0y commented Nov 14, 2024

Fix pre-commit eslint hook broken by #13843

Currently running the eslint hook on JS files results in this lengthy error message:

Error

**(node:13057) ESLintIgnoreWarning: The ".eslintignore" file is no longer supported. Switch to using the "ignores" property in "eslint.config.js": https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files
(Use `node --trace-warnings ...` to show where the warning was created)

Oops! Something went wrong! :(

ESLint: 9.14.0

ESLint couldn't find an eslint.config.(js|mjs|cjs) file.

From ESLint v9.0.0, the default configuration file is now eslint.config.js.
If you are using a .eslintrc.* file, please follow the migration guide
to update your configuration file to the new format:

https://eslint.org/docs/latest/use/configure/migration-guide

If you still have problems after following the migration guide, please stop by
https://eslint.org/chat/help to chat with the team.
**

This PR fixes this by migrating to the new config format.

using the recommended `@eslint/migrate-config` tool.

This explicitly uses the commonJS format as the default format
as the ecmascript module format doesn't work with pre-commit.
pre-commit/pre-commit#3321
@Swiftb0y Swiftb0y changed the title chore: migrate to eslint v9 "flat" config format fix: eslint v9 pre-commit hook Nov 14, 2024
Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you.

@daschuer daschuer merged commit d80d531 into mixxxdj:2.4 Nov 14, 2024
14 checks passed
@Swiftb0y
Copy link
Member Author

Thank you

@Swiftb0y Swiftb0y deleted the chore/upgrade-eslint-config-v9 branch November 14, 2024 22:22
@Swiftb0y
Copy link
Member Author

fyi eslint is still broken rn because it doesn't seem to recognize the API definitions. idk when I'll get around to fixing that. Do you have time/interested to look into it @acolombier?
https://github.com/mixxxdj/mixxx/actions/runs/11857965705/job/33047521182

@Swiftb0y Swiftb0y mentioned this pull request Nov 20, 2024
@Swiftb0y
Copy link
Member Author

My attempt to fix it @acolombier #13913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants