It sounds like you might have other configuration files in your hierarchy.
If you run ESLint on the command line inside your project and use the
—debug flag, you should be able to figure out which config files are being
used by ESLint. I’d suggest deleting your new eslintrc file first, run with
—debug, and see where config is being loaded from.

FWIW, you are setting the environment correctly. We just need to figure out
which config is being read at which time.

On Tue, Jan 21, 2020 at 8:23 AM Carl Gross <[email protected]> wrote:

> Hello,
>
> I'm currently using ESLint in my project, and have configured it to run
> inside VSCode, and enforce a custom ruleset
> <https://www.npmjs.com/package/@wordpress/eslint-plugin/v/1.0.0>.  So far
> it is working as expected, and flagging lines in my code where violations
> occur.  I now need to specify that the `environment` is `browser` (as
> suggested in the solution to this issue
> <https://github.com/eslint/eslint/issues/4015>).  How exactly do I do
> that, yet keep everything else about ESLint working as-is?
>
>  - That GitHub issue indicates I need to edit my `.eslintrc` file.  But I
> don't see any such file in the root of my project.  I *do* see `.eslint`
> files in several different dependency folders, e.g.
>
>
> C:\Users\snarl\development-snarl\development-wordpress\linting-wordpress\node_modules\is-callable
>
> I could be wrong, but those don't seem related.
>
>  - I tried creating a new file--*.eslintrc.json*--in the root of my
> project, and adding to that file:
>
>
>
>
>
> *{  "env": {    "browser": true  }}*
>
>
> But when I did this, and re-checked ESLint inside VSCode, it stopped
> flagging the rules in my custom ruleset (examples
> <https://i.imgur.com/GEcPnWg.jpg>), and actually flagged a new rule (
> screenshot <https://i.imgur.com/tHIVUIy.jpg>).  This seems to completely
> supersede some of my existing ESLint settings, rather than supplement them.
>
> Thanks.
>
>
> --
> 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].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/eslint/CAFa23ms5p13gV7ZRFHAHB9RJYUe8f%2B7vkx9Y1toMzpUo9UF2sw%40mail.gmail.com
> <https://groups.google.com/d/msgid/eslint/CAFa23ms5p13gV7ZRFHAHB9RJYUe8f%2B7vkx9Y1toMzpUo9UF2sw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
-- 

______________________________
Nicholas C. Zakas
@slicknet

Author, Principles of Object-Oriented JavaScript <http://amzn.to/29Pmfrm>
Author, Understanding ECMAScript 6 <http://amzn.to/29K1mIy>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/eslint/CAOkd9h%3DuRABF3T8Bdo91%2BAs1MjMEfvatM-TmRUi%3DYSb18QAOjQ%40mail.gmail.com.

Reply via email to