google / eslint-config-google

ESLint shareable config for the Google JavaScript style guide
Apache License 2.0
1.74k stars 140 forks source link

Work together on eslint-config-defaults #4

Closed baer closed 8 years ago

baer commented 8 years ago

Hello! I wanted to propose a collaboration between this repo and https://github.com/walmartlabs/eslint-config-defaults.

I originally set out to build config-defaults because I was tired of copy pasting my eslint config around and trying to keep them up to date across lots of projects. Eslint's extends key fixes the distribution problem but there are still two issues:

  1. Managing the eslint config file is a pain in the ass even though it is centralized. New rules are added, removed, moved and deprecated all the time and organization is terrible.
  2. Just getting up and running for a new project is not straightforward anymore and I strongly believe that code quality tooling should be well suited to those who are just starting out as they're often the ones who need it most after all.

So with this project I centralized a few configs from major players, I committed to staying on top of the latest rules (and deprecations) and most importantly I made the config composable which allows them to be easily mixed and matched!


It's obvious that you all saw the same problems and it has been enormously helpful to a lot of people but I want to take your config one step further and I am asking for your help. With eslint-config-defaults I want to try to centralize the config from a few thought leaders around the web so that folks have fast, standard and up to date options from the start.

I've been maintaining a few "unofficial" configs for a while now but it's duplicate effort and my hope is to try to collaborate/consolidate. A while back I actually painstakingly went through the old Google Style Guide and converted it to ESLint as best I could. For my part, I am committed to staying on top of the latest rules as they change. I should mention that you all have quite a few missing rules already :).

Potential Objections(?):

Anyway, I wanted to start a conversation and see if we can make it work for both of us.

@addyosmani @sindresorhus

sindresorhus commented 8 years ago

:-1: I don't understand what problem you're trying to solve by centralizing this config? It's already well maintained here. Why would we want to move it into a monolithic package? Node.js and npm is built on the idea of small focused packages.

Btw, it would also have been nice to mention in the issue description that this issue is just a semi-generic template you've been reposting on a bunch of repos ;)

https://github.com/gulpjs/eslint-config-gulp/issues/7 https://github.com/segmentio/eslint-config/issues/37 https://github.com/airbnb/javascript/issues/638 https://github.com/segmentio/eslint-config/issues/37 https://github.com/strongloop/eslint-config-strongloop/issues/5

baer commented 8 years ago

Hey @sindresorhus - thanks for the reply. I also wanted to say a quick and special thanks for your tweet about promises! Yes!

Okay, so back to the issue at hand. I'm sorry that I was not more clear with where else I was asking for collaboration. I did call it out but I didn't post links and that probably would have been helpful.

With eslint-config-defaults I want to try to centralize the config from a few thought leaders around the web

I guess I should start by giving a little context. When I first made this project, it's sole purpose was to greatly improve management of ESLint config by decomposing it. At that point the airbnb/javascript project was a mess of deprecated lint rules and the google config didn't exist. Then after ESLint 1.0 I saw not only were there no defaults but that eslint --recommended generated a terrible (in organization not content) file.

I decided to try to aggregate to make things better. I ported the eslint recommendations, I translated the Google guide (btw this project doesn't match Google JavaScript Style Guide) and I helped the Airbnb folks get theirs cleaned up. Fast forward to now and many companies have published their own configs and I think it's great! It's so much better than it was at the time. But, with a couple of rare exceptions I have not seen these companies solve the organization problem.

Perhaps you're right and now that so many people have their own configs it would be better to decentralize but the reason I'd love to collaborate is that using the structure I have, a user could mix and match or depend on only the parts that they need in ways that were not possible before:

---
"extends":
  - "defaults/rules/eslint/best-practices/walmart",
  - "defaults/rules/eslint/errors/airbnb"

  - "defaults/rules/eslint/es6/off"
  - "defaults/rules/eslint/node/off"

Of course some of this could be solved by just suggesting/helping other projects fork the decomposed version but then the maintenance burden of keeping up to date on lint rues is on more people.

I appreciate your feedback :). Also, happy holidays!