davidjbradshaw / eslint-config-auto

Automatically configure ESLint based on project dependencies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Have you heard of Canonical?

gajus opened this issue · comments

Don't want to spam, but just wanted to make you aware of https://github.com/gajus/eslint-plugin-canonical

{
  "extends": [
    "canonical/auto"
  ]
}

setups auto formatting using over 1,000+ ESLint rules. I've been maintaining this for 8 years.

The point of posting it here is to see if our efforts overlap and if you'd like to consolidate. @davidjbradshaw

Hi,

Sorry for the slow reply, your project is new to me. I've mainly based this on the stuff listed at awesome-eslint. My aim has been to use recommend configs as much as possible, in order to avoid casting my own opinion on to the rules.

Are you also sniffing for installed packages, or is it up to the user to configure which bits they need?

It is entirely automatic.

I just realized I linked to plugin accidentally as opposed to the config https://github.com/gajus/eslint-config-canonical

Just had a deeper look, it seems we have the same aim, but a slightly different approach.

My aim, and I guess yours aim as well, is to have a single ESLint config that covers every project that you can throw at it, rather than ending up with a different config in every project.

Looking at both projects, we have a slightly different set of eslint plugins, I expect we both have ones that the other hasn't come across before. At least looking at your list there are a few that are new to me.

I see you are maintaining your own ruleset for each plugin, where as I mainly use the recommended configs with as few as modifications as possible. These are mainly where two plugins over lap. I have to ask how are you maintaining all those config files? Are they automatically produced?

Then the biggest difference if I am reading your project correctly is that you load in everything, where as my project inspects package.json to see which JS packages your using and then only installs the eslint plugins that the project being listed actual needs. This is done to improve the performance of eslint.

Have a look at these two files, that show how the dynamic loading works.

https://github.com/davidjbradshaw/eslint-config-adjunct/blob/master/configs.js
https://github.com/davidjbradshaw/eslint-config-adjunct/blob/master/lib/missing.js

Going forward eslint changing to their new flat config format is a major headache for me, as this is a breaking change for my config and a single plugin switching format files breaks everything currently. I've not yet had time to workout a proper workaround for this.

How where you thinking these two projects should be consolidated?

@gajus still interested in chatting about merging our two cofigs?