There's currently no way to get that information from the rule. Just to 
clarify, you don't have to pass a directory to eslint, it could be a file path, 
or a glob. Globs are processed before anything else is executed and are not 
kept anywhere in the system. You can get a path to a file currently being 
linted from the rule, but not the path that was passed in.

Thanks,

                Ilya Volodin

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of 
Slavik Lvovsky
Sent: Thursday, December 14, 2017 6:35 AM
To: ESLint <[email protected]>
Subject: [ESLint] How to get direct of files to be checked by eslint?

Hi Experts,

Is there a way to get javascript source files directory from my custom 
rule/plug-in?
I have a use case where I need to create a custom rule that needs to get 
quantity of js files.
Example: if I run "eslint srcdir" I want somehow to get srcdir from me 
rule/plug-in.

Regards,
Slavik.

-- 
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.

-- 
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