In Visual Studio Code, when using the eslint extension, you may get the error below. In the bottom right of the screen, you have a red circle next to ESLINT:
Hovering over the red circle, we see the message “ESLint execution is not approved or denied yet. Click to open approval dialog”:
There are a few reasons why this may occur. The first thing to do is to initialize ESLINT for the project. For me, I had to do it in the following directory with the command below:
./node_modules/.bin/eslint --init
Once you do that, you should see the ESLINT server running:
Now click on the red circle, and you should see the pop-up “The ESLint extension will use ‘node_modules/eslint’ for validation” Click Allow Everywhere:
We now see checkboxes next to ESLint:
And if we open a file, we see ESLint is now working on the file, displaying errors:
I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.
IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.
THANK YOU, AND LET'S KEEP LEARNING TOGETHER.
CARL
You can certainly see your expertise within the work you
write. The sector hopes for even more passionate writers such
as you who aren’t afraid to say how they believe.
All the time follow your heart.