Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ESLint not working: VSCode warning: "ESLint is disabled since its execution has not been approved or denied yet"

My VS Code has the ES Lint plugin installed and has, all of a sudden, stopped working. All I can see is a yellow squiggly at the first line of my files, which shows the message: "ESLint is disabled since its execution has not been approved or denied yet". Goes without saying, ESLint no more does what it should do. Does nothing in fact.

Though this isn't really work-stopper kind of issue, it sure is a bit annoying, having been used to coding with ESLint by my side always.

Any help is much appreciated. Thanks!

like image 445
Harshith Rai Avatar asked Dec 05 '20 13:12

Harshith Rai


People also ask

Why can’t I See my ESLint errors/warnings in VS Code?

By default, VS Code will show errors/warnings for only files which are opened in VS Code. If you close all the files, the count of error/warning will be reduced to 0. So if you are adding ESLint to any existing project, you won’t be able to see the total errors/warnings of the project in VS Code.

How do I add ESLint to Visual Studio Code?

Visual Studio Code > Programming Languages > ESLint New to Visual Studio Code? Get it now. Integrates ESLint into VS Code. If you are new to ESLint check the documentation. The extension uses the ESLint library installed in the opened workspace folder.

How do I configure ESLint to read my script?

This can be in the form of a .eslintrc.* file or an eslintConfig field in a package.json file, both of which ESLint will look for and read automatically, or you can specify a configuration file on the command line. Here are some of the options that you can configure in ESLint: Environments - which environments your script is designed to run in.

Why can’t I Lint with ESLint?

Since you are able to successfully lint via command line, the issue is most likely in the configuration of the ESLint plugin. Assuming the extension is properly installed, check out all ESLint related config properties in both project (workspace) and user (global) defined settings.json.


1 Answers

Found the solution. And it's rather simple. Thanks to this site, found the solution that fixed my problem. Gereon too has mentioned it rightly in his comment.

Turns out I had somehow disabled the extension in VSCode. All I had to do was enable it. There's an icon at the bottom right corner that says ESLint, and if disabled, it's shown with a red icon. All that I had to do was click on it, and allow it to be enabled everywhere in the dialog that was shown soon after.

enter image description here

like image 119
Harshith Rai Avatar answered Oct 20 '22 01:10

Harshith Rai