- Modern JavaScript Web Development Cookbook
- Federico Kereki
- 245字
- 2021-07-02 14:49:48
There's more…
Of course, all these checks are very good, but if you had to stop working, save everything, and run a separate tool each time you wanted to check for problems in your code, it would soon become unbearable. However, with VSC you can add a plugin to interact with ESLint in real time. Go to the extensions view and search for ESLint; you should find and install an extension, currently at version 1.7.2 (March 2018), written by Dirk Baeumer.
Once you install this extension, errors will be shown on screen with a wavy red underline, and if you mouse over them, you'll get an explanation about the failed rule. Take a look at the for an example:
![](https://epubservercos.yuewen.com/0EB5F0/19470383708834806/epubprivate/OEBPS/Images/2cbacf17-225c-450b-92b8-c0bd991c1b94.png?sign=1739065013-EeSThy9QfQlg1mRy5JYeW2HVJ6ejinGc-0-289ee04e797191d3604d92dba68d184a)
There are very few configuration items for ESLint; the only one I use is "eslint.alwaysShowStatus": true, so the status bar will show whether ESLint is enabled or not.