javascript
javascript copied to clipboard
ESLint - make it easier to find out how to use, and fix link
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.
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.
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.
ah - we don't have a single file though. Our config is built up from 5-7 files, using JS.
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 "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.
@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.
I think this can be closed down. @ljharb