javascript icon indicating copy to clipboard operation
javascript copied to clipboard

ESLint - make it easier to find out how to use, and fix link

Open dandv opened this issue 7 years ago • 6 comments

For those new to ESLint, it's not clear from the README how to use the .eslintrc. Also the link to .eslintrc doesn't point to anything useful (that file just reads extends: 'airbnb').

By contrast, eslint-config-google is far clearer and links to the actual file.

dandv avatar Jun 11 '17 08:06 dandv

Specifically, it seems that eslint-config-google links to http://eslint.org/docs/user-guide/configuring#extending-configuration-files and http://eslint.org/docs/user-guide/configuring.

Those do seem useful, but I'm surprised someone not already familiar with eslint would be looking at the readme of an eslint config.

ljharb avatar Jun 11 '17 16:06 ljharb

I meant that Google's README links to the actual file, in the last paragraph before the LICENSE heading.

This was useful when I noticed that ESLint didn't check for indentation and wondered what was going on. Turns out that Google's .eslintrc removed the indent rule a few months ago.

The main reason I wish these recommended styles linked to the ruleset is comparison shopping: I'm looking to adopt a popular style that's closest to mine. Having the two .eslintrc files side by side would make this comparison easy.

dandv avatar Jun 11 '17 18:06 dandv

ah - we don't have a single file though. Our config is built up from 5-7 files, using JS.

ljharb avatar Jun 11 '17 18:06 ljharb

Also, there's hundreds of rules - I'd think reading the guide would tell you about our style better than the rule config would.

ljharb avatar Jun 11 '17 18:06 ljharb

@ljharb "Also, there's hundreds of rules - I'd think reading the guide would tell you about our style better than the rule config would. " actually for new developers your style guide, although very informative, is very hard to implement. the guide simply links to the pages describing particular eslint settings but doesn't show actual configuration of each option. so we're forced to read through each options's page to figure out what needs to be set to follow your recommendations. it's a giant waste of time since you have already done the work. please include a configured .eslintrc file with all the settings specified. that would be really useful. thanks.

KirilOkun avatar Nov 24 '18 11:11 KirilOkun

@bearoutthere the whole point of the https://www.npmjs.com/package/eslint-config-airbnb and https://www.npmjs.com/package/eslint-config-airbnb-base packages is that you don't have to configure anything - I'm not sure I understand your comment.

ljharb avatar Nov 25 '18 05:11 ljharb

I think this can be closed down. @ljharb

postmeback avatar May 11 '23 11:05 postmeback