While it's technically possible, it would be extremely complex to make such
a change. With more people using modules, I don't think there's a good
justification for such a change.

Your best bet is to concatenate the files before passing to ESLint.



On Thu, Mar 31, 2016, 9:16 AM Bryan Jones <[email protected]> wrote:

> Would it be possible to alter this behavior so that multiple files could
> (optionally) be linted in the same scope?
>
> The reason I ask is that it’s fairly common to have a build tool that
> takes multiple, independent JS files and merges them together in order to
> reduce the number of HTTP requests on a website. For application-type
> development, that’s handled with requireJS and the like, but for simpler
> websites it’s common to rely on build tools to simply take files and merge
> them into one.
>
> In the latter case, it would be useful to have ESLint consider those files
> in the same scope, as one unit.
>
> -Bryan
>
>
>
> On 31 Mar 2016, at 09:11, Nicholas Zakas <[email protected]>
> wrote:
>
> ESLint works on one file at a time, so it cannot recognize cross-file
> issues.
>
> -N
>
> On Wed, Mar 30, 2016, 4:20 PM Bryan Jones <[email protected]> wrote:
>
>> I should add: I read over the docs, but couldn't find an answer. And I
>> considered testing a couple simple rules (like the example above) to see
>> what result I get, but I wanted an official word on what ESLint's policy is
>> for handling multiple file passed at once—I wasn't sure if some rules would
>> treat all files as in the same global scope and some would be isolated
>> per-file, etc.
>>
>> --
>> 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