Webpack installs the eslint plug-in, and there is also an eslint plug-in in vscode. What's the difference?
there are other things, such as prettier, etc., so many plug-ins are used for formatting or syntax / specification checking, etc. What"s the difference? if it"s all installed, will there be no conflict between configurations?
in addition, installed sometimes there are .editrcconfig, .eslintrc, .prettierrc.jd and other files, sometimes, check the syntax, format, why there are so many. How to divide the functions, always feel that their functions are similar, plug-ins and plug-ins will not fight?
< hr >
on 2018-8-9, ask
if the project is not mandatory, but you want to regulate it when writing, according to your answers, you should only need to install the eslint plug-in in vscode. After I install it, I prompt
.
To use ESLint please install eslint by running "npm install eslint" in the workspace folder admin-manage
or globally using "npm install -g eslint". You need to reopen the workspace after installing eslint
Why install eslint"s npm package? is there any coupling between the vscode plug-in and the npm package?
webpack is reported to you for misuse during compilation. If you report an error, you will stop compiling until you fix it.
vscode is a hint for you to see, so you can see the error directly. By the way, it will help you fix simple mistakes.
conflicts will occur, but they are all configurable. If you don't know how to configure them, first get a copy configured by others and use it
.
you need to understand the difference between webpack and vscode,
vscode is an editor, the plug-ins in it are just some auxiliary tools when you edit the code, while the plug-ins of eslint in vscode assist you in writing the standard code, it will only prompt you and will not have any effect on your program.
webpack static module baler (module bundler), if you use the eslint plug-in, if it is not written in accordance with the specifications, it will stop compiling, you open the browser to view console will prompt you, it is really affecting your program.
the conflict between the two means that the configuration files on both sides are different. For example, in the configuration file in vscode, your string uses double quotes, but in webpack it is single quotation marks, so you will not be prompted for errors in vscode, but webpack will report errors when packaging.
check the syntax and format the code, which means that the code is more standardized in the era of multi-person collaborative development.
the answer upstairs is not accurate.
to be exact, the eslint in webpack is the loader, and the full name is eslint-loader. It's just a loader that handles some files, so it's essentially loader
.
vscode is an editor, and eslint in vscode is essentially a vscode plug-in
,
he calls eslint, and sends eslint's error back to vscode, that's all.
what's the difference between webpack and webpack-cli? You can compare and understand
.
upstairs has been solved. In addition, there are many plug-ins, if the functions are different, it is basically impossible to fight. And a pile of configuration files, can only be said to be a disease of history, there is no way.