Skip to content

Migrate to flat ESLint flat config and remove cross-env #3758

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

outslept
Copy link
Contributor

@outslept outslept commented Apr 15, 2025

No description provided.

- migrated ESLint configuration to new flat config format
- removed usage of FlatCompat and .eslintrc* dependency
- switched stylistic rules to @stylistic/eslint-plugin-js
@outslept outslept changed the title Migrate to flat config and drop .eslintrc support Migrate to flat ESLint flat config and remove cross-env Apr 15, 2025
@outslept
Copy link
Contributor Author

Added an ignore field to silence unnecessary ESLint warnings in test files. This removes the bulk of the noise, but there are still a few lingering warnings left. Not sure yet how best to handle those, so I'll keep this PR as a draft for now

@zachleat
Copy link
Member

Ah, sorry — what is the benefit here? Seems like if I’m going to use ESLint it’s better to stick ESLint packages directly, no?

@outslept
Copy link
Contributor Author

outslept commented Apr 17, 2025

Ah, sorry — what is the benefit here? Seems like if I’m going to use ESLint it’s better to stick ESLint packages directly, no?

You're talking about the ignores field? I'm just worried about a big bunch of warnings (over 200 I believe) after running lint command from root, so that's the workaround I've come up with.

If the presence of these warnings does not interfere - I'll remove this field, no problem 😅

@zachleat
Copy link
Member

Ah, no sorry — I mean the use of @stylistic packages — I’m not familiar with this project

@outslept
Copy link
Contributor Author

outslept commented Apr 17, 2025

Ah, no sorry — I mean the use of @stylistic packages — I’m not familiar with this project

Ahh, with the ESLint v9 release, they just moved the stylistic rules out of the core and put them into separate stylistic plugin. So if you search for a rule like space-unary-ops, the documentation will show:

image

Source: https://eslint.org/docs/latest/rules/space-unary-ops

They deprecated these style rules from the core because they were becoming a massive maintenance burden, suggesting formatters or the @Stylistic plugins as the new home for style rules.

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

Successfully merging this pull request may close these issues.

2 participants