eslint / js

Monorepo for the JS language tools.
BSD 2-Clause "Simplified" License
2.29k stars 196 forks source link

Convert into monorepo #609

Closed nzakas closed 3 months ago

nzakas commented 5 months ago

In our discussion of how to move forward with incorporating all of the JS-related packages into a single repo the vote was clear: people prefer a monorepo with individual packages.

Rather than creating a new repo and moving everything into that, I propose that we repurpose the Espree repo as a monorepo containing all of the JS-related packages. Because Espree is the one where we do the most work and have the most history, this seems like a good way to retain the package history while still moving us forward.

Here are the transition steps I have in mind.

Steps

After that, it would be nice to get the packages transitioned to ESM and type checking, but that can be done incrementally.

Note: I'm looking for volunteers to do this as I already have too much on my plate.

snitin315 commented 5 months ago

I'll work on it.

nzakas commented 5 months ago

@snitin315 we still need this accepted by the TSC, so please hold off for now.

nzakas commented 5 months ago

@eslint/eslint-tsc still looking for feedback here.

fasttime commented 5 months ago

Sounds good to me 👍🏻 This will allow all three packages to share the same tooling so it should simplify maintenance.

mdjermanovic commented 5 months ago

Sounds good to me too 👍

mdjermanovic commented 5 months ago

it would be nice to get the packages transitioned to ESM

All three packages are already ESM. In that regard, a difference between these and eslint/rewrite packages is only that in these packages we're publishing ESM source code as-is (all files), whereas in eslint/rewrite packages we're publishing an ESM bundle.

nzakas commented 5 months ago

All three packages are already ESM. In that regard, a difference between these and eslint/rewrite packages is only that in these packages we're publishing ESM source code as-is (all files), whereas in eslint/rewrite packages we're publishing an ESM bundle.

Ah, didn't realize everything was in ESM already.

In rewrite, I'm bundling first to avoid tsc creating a new .d.ts file for every file in src (which just seems like a better way to do things). We can do that in this repo as a follow-on step.

@snitin315 this is ready for you. 🎉

nzakas commented 5 months ago

@snitin315 are you still planning on working on this?

snitin315 commented 5 months ago

@nzakas yes, I've made some progress locally will open a PR soon.

aladdin-add commented 3 months ago

We also need to rename the repo to something like eslint/js, but there is already an npm package called @eslint/js which can be confusing.😖

does it make sense to also moving @eslint/js to here?

nzakas commented 3 months ago

does it make sense to also moving @eslint/js to here?

Eventually, yes, but that will be a lot of work. So we'll have to live with the confusion for a while.

aladdin-add commented 3 months ago

@nzakas I've added a new step: "rename the repo to eslint/js, and update all links", just in case we forget about it. :)

nzakas commented 3 months ago

Renamed :+1:

snitin315 commented 3 months ago

Is there anything remaining for this issue?

aladdin-add commented 3 months ago

I think no. but want @nzakas to verify.

nzakas commented 3 months ago

Looks like we got it all. Thanks @snitin315! 🙏