Skip to content

Conversation

@dynst
Copy link
Contributor

@dynst dynst commented Jul 17, 2025

Unless there's a good reason not to run eslint on the whole repo?

@webmaster128
Copy link
Member

During development it can be handy to be able to run lint only in the package you are currently working in, especially as I cannot get the UI integration to work with yarn at the moment. Linting takes quite some time. Is there a way to restrict the lint to a single package in this setup?

@dynst
Copy link
Contributor Author

dynst commented Jul 22, 2025

Yeah, I noticed that, so I was just doing:

yarn run eslint --fix packages/crypto/

To restrict to a specific directory.

@dynst dynst marked this pull request as draft July 24, 2025 13:44
@webmaster128
Copy link
Member

In eslint/eslint#16960 there is a good amount of users complaining about the suggestion to centralize eslint config in a repo root file. It seems like this feedback was not expected when the flat config system was developed. But starting with eslint 10 there is a new resolution system that looks up the config in the current directory and then moves up.
https://eslint.org/docs/latest/use/configure/configuration-files#experimental-configuration-file-resolution
Bildschirmfoto 2025-07-29 um 15 13 50

For us I think it is not a big deal to move everything to repo root. Linting per package is not really needed and possible by calls as you showed above.

So from my point of view we can proceed here and get this work ready for merge.

Thank you!

@dynst dynst marked this pull request as ready for review July 29, 2025 18:28
@dynst dynst force-pushed the eslint-monorepo-root branch from dc6e514 to 618981a Compare July 29, 2025 18:29
@dynst
Copy link
Contributor Author

dynst commented Jul 29, 2025

I think this has to wait on the .eslintrc.js changes in #1740 (so typescript lints aren't run on the .js files in scripts/)

@dynst dynst force-pushed the eslint-monorepo-root branch from dc6e514 to 618981a Compare July 29, 2025 18:44
Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

Wasn't this PR supposed to remove all the "lint" scripts from the packages in favour of the top levels lint?

@dynst dynst force-pushed the eslint-monorepo-root branch from 618981a to c355cce Compare July 29, 2025 19:06
@dynst
Copy link
Contributor Author

dynst commented Jul 29, 2025

Yep, just had to rebase the last commit against recent changes first. Wanted to see if the early non-conflicting commits passed CI

@webmaster128 webmaster128 merged commit 461772f into cosmos:main Jul 30, 2025
13 checks passed
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.

2 participants