Can't disable an env in a single file
See original GitHub issueI’ve got a project all written in ES6, except for a single file that is in ES5.
In my .eslintrc:
env:
es6: true
node: true
browser: true
In the single ES5 file:
/*eslint-env es6:false*/
const fn = () => {};
I expected to get an eslint error for the fat arrow, but there’s no error.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:22 (14 by maintainers)
Top Results From Across the Web
How to hide .env file from Github - Stack Overflow
1st try: create .gitignore in your root project then include your file which want to ignore in GitHub repository. if 1st one do...
Read more >Why I can't permanently remove these environment variables ...
No, unset cannot permanently remove environment variables, much like export does not permanently set them either, because there is simply no ...
Read more >Overriding One Single Value in Your Docker-Compose .env File
In Conclusion Overriding a single value in your docker-compose . env file is reasonably simple: just set an environment variable with the same...
Read more >Environment variables in Compose | Docker Documentation
There are multiple parts of Compose that deal with environment variables in one sense or another. This page should help you find the...
Read more >Env Variables and Modes - Vite
An env file for a specific mode (e.g. .env.production ) will take higher priority than a ... To prevent accidentally leaking env variables...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So in the end there is no plan to add this feature (disabling an env in a comment)? It’s quite useful when you are gradually migrating your app from ES5 and ES6 and have a mix of both in the same folder, and it’s always better to remove comments disabling es6 as you migrate rather than adding them to enable it.
Looks like this is now availabe, at least in v3.3.1 I am using:
More here: http://eslint.org/docs/user-guide/configuring