Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Can we bundle ESLint and Espree directly in this repository on build? #596

Closed
kaicataldo opened this issue Jul 11, 2019 · 9 comments
Closed
Labels
enhancement This change enhances an existing feature of the website infrastructure Relates to the tools used to develop the website

Comments

@kaicataldo
Copy link
Member

kaicataldo commented Jul 11, 2019

We currently bundle lib/linter/linter.js and espree and copy the bundles into this repository during the release script.

It would be nice if we could just do all the bundling directly in this repository every time we build.

Some problems to solve:

  1. The publish step occurs after the site is generated, so we can't just pull and build the latest version on commit.
  2. We would have to figure out how to bundle the latest releases while not changing the versions we're using to lint this repository.

Benefits:

  1. eslint/eslint wouldn't have to worry about bundling any more
  2. We can consolidate the Webpack/Babel configs in this repository.
@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Jul 11, 2019
@kaicataldo kaicataldo added enhancement This change enhances an existing feature of the website infrastructure Relates to the tools used to develop the website and removed triage An ESLint team member will look at this issue soon labels Jul 11, 2019
@ilyavolodin
Copy link
Member

The issue with that is updates to the site that happen outside of regular ESLint release schedule. In that case, we might've already merged some changes into master on ESLint/espree repositories, but haven't yet published them. Site will pull whatever is latest. If we can make it pull from the last known tag, I'd be fine with that (faster release build is always a good thing).

@kaicataldo
Copy link
Member Author

Should have clarified, but that’s what I was intending above. Definitely should build with the latest published release, not what’s in master on GitHub.

@kaicataldo
Copy link
Member Author

kaicataldo commented Jul 20, 2019

Relevant discussion here: eslint/eslint#12006 (comment)

@platinumazure
Copy link
Member

I would love to see if we could have a build/release step which pulls in ESLint and espree and builds them here. Additionally, this repo could be responsible for copying the documentation from the ESLint repository. This would allow ESLint to go back to a mostly standard release (i.e., wouldn't need to add much to what eslint-release already provides), and this repository can then fully "own" the logic for building and deploying the website.

@kaicataldo
Copy link
Member Author

I really like that idea. We could then change our release build to do the following:

  1. Clone eslint/eslint and eslint/website
  2. Run the release script in eslint/eslint
  3. Run the release script in eslint/website, which copies the doc files from eslint/eslint and generates the eslint/espree bundles and commits them so that the Netlify build can then also bundle them.

It would be nice if we could bundle eslint/espree directly into the build step bundles (since it could potentially reduce bundle size), but that would require a much more complicated build step (we'd have to specify the eslint version to bundle and clone it from GitHub directly, I think, since we don't necessarily want to update the site's ESLint version on every release).

@kaicataldo
Copy link
Member Author

Would love to continue this discussion! At this point, would it be best to bring this to the TSC?

@ilyavolodin
Copy link
Member

I don't think this requires TSC approval. I'm for trying this out. Seems like a good idea.

@nzakas
Copy link
Member

nzakas commented Feb 5, 2020

@kaicataldo has this been addressed? It looks like there were some PRs merged related to this, so just checking.

@kaicataldo
Copy link
Member Author

Ah, yes! We should be good to go here. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement This change enhances an existing feature of the website infrastructure Relates to the tools used to develop the website
Projects
None yet
Development

No branches or pull requests

4 participants