espree icon indicating copy to clipboard operation
espree copied to clipboard

Convert into monorepo

Open nzakas opened this issue 1 year ago • 9 comments
trafficstars

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

  • [ ] Move all Espree-specific files into packages/espree
  • [ ] Update release-please configuration to be a monorepo setup (like `eslint/rewrite)
  • [ ] Update root README so it's not Espree-specific
  • [ ] Update issue templates to indicate which package an issue is for
  • [ ] Move eslint-scope from its own repo into packages/eslint-scope and update release-please
  • [ ] Move eslint-visitor-keys from its own repo into packages/eslint-visitor-keys and update release-please

Later 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.

nzakas avatar Jun 14 '24 15:06 nzakas

I'll work on it.

snitin315 avatar Jun 15 '24 04:06 snitin315

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

nzakas avatar Jun 17 '24 14:06 nzakas

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

nzakas avatar Jun 18 '24 19:06 nzakas

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

fasttime avatar Jun 19 '24 05:06 fasttime

Sounds good to me too 👍

mdjermanovic avatar Jun 19 '24 12:06 mdjermanovic

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.

mdjermanovic avatar Jun 19 '24 12:06 mdjermanovic

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 avatar Jun 19 '24 13:06 nzakas

@snitin315 are you still planning on working on this?

nzakas avatar Jul 02 '24 20:07 nzakas

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

snitin315 avatar Jul 02 '24 22:07 snitin315

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?

aladdin-add avatar Aug 06 '24 09:08 aladdin-add

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.

nzakas avatar Aug 06 '24 14:08 nzakas

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

aladdin-add avatar Aug 15 '24 05:08 aladdin-add

Renamed :+1:

nzakas avatar Aug 15 '24 15:08 nzakas

Is there anything remaining for this issue?

snitin315 avatar Aug 24 '24 10:08 snitin315

I think no. but want @nzakas to verify.

aladdin-add avatar Aug 25 '24 04:08 aladdin-add

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

nzakas avatar Aug 26 '24 15:08 nzakas