You may want to take a look at the Getting Started guide: https://eslint.org/docs/user-guide/getting-started
in general you’d use “npx eslint filename.js —debug” You can also run without —debug time see what you’d get as output, as sometimes it’s different than what VS Code gives you. (We don’t own the VS Code integration, so sometimes things can get out of sync.) On Tue, Jan 21, 2020 at 8:46 AM Carl Gross <[email protected]> wrote: > Hey thanks for that. Here are my follow-ups. > > >> I’d suggest deleting your new eslintrc file first > > OK I'll do that first. > > >> 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've never used ESLint from the command line. Would I run: > > *eslint filename.js --debug* > > Thanks, > > Carl > > > > > On Tuesday, January 21, 2020 at 11:37:47 PM UTC+7, Nicholas Zakas wrote: >> >> 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/c5f77688-93c6-49f4-8a7c-7184782445bd%40googlegroups.com > <https://groups.google.com/d/msgid/eslint/c5f77688-93c6-49f4-8a7c-7184782445bd%40googlegroups.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/CAOkd9hnRMAeQKvHFzayi3%3D8KLq735xeWsOdCk9A0iAEWKDMhEw%40mail.gmail.com.
