Processing method of eslint verification error

Processing method of eslint verification error

When encountering the eslint verification rule, the following errors or warnings are reported:

1. When encountering no unused vars, no unused expressions, no undef, no restricted globals and other errors, you can verify that the function is turned off by configuring the rules in eslint
2. If there are too many errors and warnings when encountering a file (such as the imported plug-in min.js), you can create it in the root file = & gt Eslintcore (don’t forget the previous point) and configure it, as shown in the following figure:
/SRC/view = & gt; The view file under SRC file ignores the verification
[ Insert picture description here]( https://img-blog.csdnimg.cn/49aecec84d054cc5a2e4eae7fe6fbbda.png#pic_ center

1. If eslint is configured in a separate file

Configure the required verification rules in the created. Eslintrc.js, as shown in the following figure:

2. Referenced scaffolds, such as create react app

Configure verification rules in package.json:

Read More: