Yes, it does expect a package OR a file path.
So the only option I see is to make a special case in the configuration
loader (or in the command line argument parser).
Would that be acceptable?

On Fri, Jan 6, 2017 at 10:54 PM, Nicholas Zakas <[email protected]>
wrote:

> I'm pretty sure -c expects a file path or package name, so
> eslint:recommended won't work. I'm unsure if that's intentional or if it's
> a bug, so feel free to open an issue.
> On Fri, Jan 6, 2017 at 5:49 AM Capi Etheriel <[email protected]> wrote:
>
>> If I install both eslint and eslint-config-google, I can run it right
>> away without any issues:
>>
>> ./node_modules/.bin/eslint --config eslint-config-google script.js
>>
>> But I cannot use eslint:recommended
>>
>> ./node_modules/.bin/eslint --config eslint:recommended script.js
>>
>> Cannot read config file: ~/myproject/eslint:recommended
>> Error: ENOENT: no such file or directory, open '~/myproject/eslint:
>> recommended'
>> Error: Cannot read config file: ~/myproject/eslint:recommended
>> Error: ENOENT: no such file or directory, open '~/myproject/eslint:
>> recommended'
>>     at Object.fs.openSync (fs.js:558:18)
>>     at Object.fs.readFileSync (fs.js:468:33)
>>     at readFile (~/myproject/node_modules/eslint/lib/config/config-file.
>> js:70:24)
>>     at loadLegacyConfigFile (~/myproject/node_modules/
>> eslint/lib/config/config-file.js:142:44)
>>     at loadConfigFile (~/myproject/node_modules/
>> eslint/lib/config/config-file.js:222:22)
>>     at Object.load (~/myproject/node_modules/
>> eslint/lib/config/config-file.js:498:18)
>>     at loadConfig (~/myproject/node_modules/eslint/lib/config.js:63:33)
>>     at new Config (~/myproject/node_modules/eslint/lib/config.js:228:38)
>>     at CLIEngine.executeOnFiles (~/myproject/node_modules/
>> eslint/lib/cli-engine.js:590:28)
>>     at Object.execute (~/myproject/node_modules/
>> eslint/lib/cli.js:171:107)
>>
>> My question is: is it possible at all? If so, how?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "ESLint" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>


-- 
Capi Etheriel
Desenvolvedor e Designer para Web
Comunidade TransparĂȘncia Hacker
http://barraponto.blog.br http://zerp.ly/barraponto

-- 
You received this message because you are subscribed to the Google Groups 
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to