Skip to content

Conversation

@thomasvargiu
Copy link
Member

@thomasvargiu thomasvargiu commented Mar 5, 2025

  • Migrate to flat config and ES modules
  • Migrate to @smarttools/eslint-plugin-rxjs for eslint 9 compatibility

Resolves #10

@thomasvargiu thomasvargiu requested a review from siuvdlec March 5, 2025 12:51
@thomasvargiu
Copy link
Member Author

@siuvdlec can we release an alpha version then?

@siuvdlec
Copy link
Member

siuvdlec commented Mar 6, 2025

@siuvdlec can we release an alpha version then?

yep, 1.0.0-rc.0

@giacomoforlani
Copy link
Collaborator

Hi @thomasvargiu and @siuvdlec,
I’ve just pushed some changes to this branch to enable rules that weren’t applied by default. I’ve also installed eslint-plugin-fp-ts@0.4.0, since the previous version isn’t compatible with eslint@9.

One thing I noticed: when trying to use this setup in another project, I had to explicitly define all the ignore paths. With eslint@8, folders like dist, build, and .next were ignored by default.

Do you think it makes sense to include these ignore paths directly in the plugin configuration?

@thomasvargiu
Copy link
Member Author

@giacomoforlani I'm not experiencing something like that. Probably you need to update the command with something like this eslint src test

@giacomoforlani
Copy link
Collaborator

Hey @thomasvargiu,

I made a few tweaks to the ESLint config to make it work. Since ESLint 9 doesn’t support the --ext flag anymore, I had to specify the file types directly in the config using files: ["**/*.{ts,tsx}"]. This way, ESLint knows exactly which files to lint without relying on CLI options. Despite this change, I had to update the ignore list anyway by adding "**/.next/**" and "**/*.*js" paths.

Even though .js files aren’t included in the files pattern, ESLint still scans them unless you explicitly ignore them—so I added **/*.*js to avoid unnecessary processing or config warnings.

As for the .next folder: before, ESLint 8 used to ignore dotfolders by default. But with ESLint 9 and the new flat config (eslint.config.js), that doesn’t happen anymore—you have to ignore them manually now.

I also added the --flag v10_config_lookup_from_file option. This changes how ESLint finds its config: instead of starting from the working directory, it starts from the file being linted and walks up the folder tree until it finds a config file.
This works better in monorepos where each package might have its own ESLint setup.

We need to report these adjustments in a migration guide. Other than that, the MR is ready for review, merge, and release by @siuvdlec.

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.

Upgrade eslint peerDependency to 9

5 participants