Answered by:
Error in Js File After Update VS 2017

Question
-
User338455301 posted
Hi,
I Have many error in my js file after update my visual to 15.8.1
what is problem ?
Error
Error Mixed and Space Tabs
Error eqeqeq (ESLint) Expected '===' and instead saw '=='.
and etc.
I Install Productivity Power Tools
but the error is still thereMonday, August 27, 2018 4:50 AM
Answers
-
User283571144 posted
Hi elahi1mahdi,
elahi1mahdi
How to Solve This Problem ?According to your description, I found this error is thrown by ESLint.
As far as I know, the VS team has reimplemented ESLint support for15.8
If you don't want to use it, you could disable it.
More details, you could refer to below answer:
https://stackoverflow.com/a/44458832/7609093
From release article.
We reimplemented ESLint support for this release. ESLint has the following improvements and enhancements:
- Rather than only linting saved files, Visual Studio will now lint JavaScript files as you edit, as well.
- Results can be reported for all JS files in your project, not just open files; if there are parts of your project you do not want to be linted, an .eslintignore file can now be used to specify directories and files that should be ignored.
- ESLint was updated to use ESLint 4 by default, but if your project has a local installation of ESLint, it will use that version instead.
ESLint may be disabled globally in Visual Studio by unchecking the Enable ESLint setting in the **Tools > Options > Text Editor > Javascript/Typescript > Linting ** (Figure 12).
Best Regards,
Brando
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, August 31, 2018 9:38 AM
All replies
-
User475983607 posted
You've installed analyzers through NuGet. Remove and reinstall the analyers.
Monday, August 27, 2018 11:44 AM -
User338455301 posted
I have not install analyzers at all.
I have just install This Package through NuGet.
Monday, August 27, 2018 1:40 PM -
User475983607 posted
I had the same issue. Removing and reinstall the analysers worked for me. Or just remove the analyzers as the error is related JavaScript validation.
Edit: references.
https://docs.microsoft.com/en-us/visualstudio/code-quality/roslyn-analyzers-overview?view=vs-2017
https://docs.microsoft.com/en-us/visualstudio/code-quality/install-roslyn-analyzers?view=vs-2017
https://docs.microsoft.com/en-us/visualstudio/code-quality/use-roslyn-analyzers?view=vs-2017
It also seems that you have NuGet reference issues where you might need to update/downgrade the packages. Sometimes just restarting VS removes the error or running "dotnet restore" from the PMC.
Monday, August 27, 2018 1:46 PM -
User338455301 posted
Where I Remove Code analysers The Package Manager Nuget ? Dont Have Uninstall item for Uninstall this package but this package is exists in Dependeices/Analyzers
What Should I do ?
Tuesday, August 28, 2018 7:42 AM -
User475983607 posted
Your image shows that you are browsing for new NuGet packages not the "Installed" packages.
Tuesday, August 28, 2018 11:24 AM -
User338455301 posted
What Should I Do ???
I Must Install Packages?
Tuesday, August 28, 2018 8:08 PM -
User338455301 posted
I Have just updated Microsoft.CodeAnalysis.Analyzers Package to 2.6 but error is still there.
How can i remove it ?
When I remove package it return to previous version Microsoft.CodeAnalysis.Analyzers 1.0 and the uninstall item is disableWednesday, August 29, 2018 4:50 AM -
User338455301 posted
How to Solve This Problem ?
Friday, August 31, 2018 4:03 AM -
User283571144 posted
Hi elahi1mahdi,
elahi1mahdi
How to Solve This Problem ?According to your description, I found this error is thrown by ESLint.
As far as I know, the VS team has reimplemented ESLint support for15.8
If you don't want to use it, you could disable it.
More details, you could refer to below answer:
https://stackoverflow.com/a/44458832/7609093
From release article.
We reimplemented ESLint support for this release. ESLint has the following improvements and enhancements:
- Rather than only linting saved files, Visual Studio will now lint JavaScript files as you edit, as well.
- Results can be reported for all JS files in your project, not just open files; if there are parts of your project you do not want to be linted, an .eslintignore file can now be used to specify directories and files that should be ignored.
- ESLint was updated to use ESLint 4 by default, but if your project has a local installation of ESLint, it will use that version instead.
ESLint may be disabled globally in Visual Studio by unchecking the Enable ESLint setting in the **Tools > Options > Text Editor > Javascript/Typescript > Linting ** (Figure 12).
Best Regards,
Brando
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, August 31, 2018 9:38 AM