The issue has been closed

posted by sindresorhus about 9 years ago 
It's later extended by your custom config.
Seems like it does not for some reason. Needs investigation.
posted by vadimdemedes about 9 years ago
posted by kevva about 9 years ago 
posted by vadimdemedes about 9 years ago 
What would be the consequence of moving those defaults into another base config that we conditionally add to extends
, instead of force setting them like that?
posted by jamestalmage about 9 years ago
I don't think there are any consequences other than creating a config for it may seem unnecessary but in this case it might be needed.
posted by kevva about 9 years ago
Why are those rules not in the default xo (or xo-react) config in the first place?
posted by vadimdemedes about 9 years ago
Why does xo forces these default rules here (https://github.com/sindresorhus/xo/blob/2d26d79ea81f893fc7b1ff9e586c1e74ad28c830/options-manager.js#L98) ?
The Babel parser and plugin have some incompatible rules. So we first need to reset the original rules, then set the Babel ones. That line just sets it to the same value as in eslint-config-xo
.
What would be the consequence of moving those defaults into another base config that we conditionally add to extends, instead of force setting them like that?
That would be the way to go. Anyone wanna do a PR?
Why are those rules not in the default xo (or xo-react) config in the first place?
They are, but here we do something different as we're using the esnext
rules even though the esnext
option is not set. We do this so esnext features will still work without the esnext
option, just not linted as such.
posted by sindresorhus about 9 years ago
posted by sindresorhus about 9 years ago 
Tried it out in a real app and now shareable configs don't work at all:
$ npm install eslint-config-vdemedes
package.json:
"xo": {
"extends": ["vdemedes"]
}
output when running latest xo:
Error: Cannot find module 'eslint-config-vdemedes' from '/Users/vdemedes/Projects/xo/node_modules'
Referenced from:
at Function.module.exports [as sync] (/Users/vdemedes/Projects/xo/node_modules/resolve/lib/sync.js:33:11)
at resolve (/Users/vdemedes/Projects/xo/node_modules/eslint/lib/config/config-file.js:417:38)
at load (/Users/vdemedes/Projects/xo/node_modules/eslint/lib/config/config-file.js:436:24)
at /Users/vdemedes/Projects/xo/node_modules/eslint/lib/config/config-file.js:355:36
at Array.reduceRight (native)
at Object.applyExtends (/Users/vdemedes/Projects/xo/node_modules/eslint/lib/config/config-file.js:338:28)
at loadConfig (/Users/vdemedes/Projects/xo/node_modules/eslint/lib/config.js:63:37)
at new Config (/Users/vdemedes/Projects/xo/node_modules/eslint/lib/config.js:170:44)
at CLIEngine.executeOnFiles (/Users/vdemedes/Projects/xo/node_modules/eslint/lib/cli-engine.js:492:28)
at runEslint (/Users/vdemedes/Projects/xo/index.js:67:16)
Might be related: https://github.com/eslint/eslint/issues/5411.
posted by vadimdemedes about 9 years ago
Added a PR to demonstrate this issue - #83.
posted by vadimdemedes about 9 years ago
I ended up reverting to the previous workaround. Don't have time to fix this properly right now. New version is out btw. I still would like to see this fixed at some point.
posted by sindresorhus about 9 years ago
I ended up reverting to the previous workaround
Are you saying that there is another way to have different configs for subfolders?
posted by bfred-it about 8 years ago
@bfred-it I'm not sure what you're asking? Doesn't seem relevant to this thread.
posted by sindresorhus about 8 years ago
posted by bfred-it about 8 years ago 
posted by sindresorhus almost 8 years ago 
@issuehunt has funded $60.00 to this issue.
posted by IssueHuntBot almost 6 years ago
This will be fixed with #702
posted by sindresorhus 8 months ago
The bounty has been moved to #702
posted by sindresorhus 8 months ago