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.