Visual Studio 2017에서 JavaScript 빌드 오류를 비활성화하는 방법은 무엇입니까?
방금 Visual Studio 2017을 RC에서 최종으로 업데이트했습니다. 다음 오류가 발생하지 않았지만 최근 에이 오류가 발생합니다. 프로젝트를 빌드 할 때 다음 오류가 발생하여 웹 프로젝트가 시작되지 않습니다.
Severity Code Description Project File Line Suppression State
Error eqeqeq (ESLint) Expected '===' and instead saw '=='. VistaBest.Shop.Web C:\***\Request.js 21
Visual Studio 2017에서 JavaScript 작성 오류를 비활성화하려면 어떻게합니까?
나는 해결책을 찾는다.
- 열다
Tools > Options - 탐색
Text Editor > JavaScript/TypeScript > EsLint(VS2017 15.8은Linting아닙니다EsLint) - 설정
Enable ESLint에False
Visual Studio 2017 (v 15.8.0)에서 :
옵션 1 : 옵션> JS 오류
- 열다
Tools > Options - 로 이동
Text Editor > JavaScript/TypeScript > Code Validation - 설정
Enable JavaScript errors에false - 또는 설정
Enable JavaScript errors에true와Show errors as warnings에true
이를 적용하려면 Visual Studio를 다시 시작해야했습니다.
옵션 2 : 옵션> 보풀
아래에 글로벌 린팅 설정을 편집 할 수있는 다른 옵션이 있습니다.
옵션 3 : .eslint 파일
You can also create a file named .eslintrc in the root of your project.
Option 4: ESLint commands in-file
Resources
I tried Mohammad`s solution but it didn't work. I managed to work doing the following:
- Righ click on your web .csproj file
- On the first
<PropertyGroup>add the following entry:<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
Add /*eslint eqeqeq: ["error", "smart"]*/ to the first line of your Javascript code to remove the errors. https://eslint.org/docs/rules/eqeqeq
Following Mohammad's solution will turn off ESLint for syntax checking. This works in VS2015 and should work in later versions.
For Visual Studio 2019.
- Open Tools > Options
- Navigate to Text Editor > JavaScript/TypeScript
- => Linting > General.
Then unchecked ESLint check box. Please The bellow Image for reference.
I've just had to change the "eqeqeq" rule behaviour to include "smart":
Edit the .eslintrc file found in your user root folder mentioned in other answers already.
The change is made to the rules section by adding the smart rule
"rules": {
"eqeqeq": [2, "smart"],
Copied from the web article: This option enforces the use of === and !== except for these cases:
- Comparing two literal values
- Evaluating the value of typeof
- Comparing against null
I found the specifics at: https://eslint.org/docs/2.0.0/rules/eqeqeq
Mohammad의 솔루션을 사용해 보았지만 운이 없어도 Rafeel 답변을 따르고 제안 된 코드 샘플을 추가하는 대신 아래 코드를 제거 web .csproj하고 마침내 프로젝트를 빌드하고 실행할 수있었습니다. 동일한 파일에서 두 곳을 제거해야했습니다. 여전히 제거 된 코드가 솔루션에 어떤 영향을 미치는지 알 수 없습니다.
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />
이것이 또한 누군가가 하루를 구하는 데 도움이되기를 바랍니다 .. !!!
'Programming' 카테고리의 다른 글
| NuGet 패키지 복원이 작동하지 않습니다 (0) | 2020.06.04 |
|---|---|
| SQL Server에서 ID 열을 업데이트하는 방법은 무엇입니까? (0) | 2020.06.04 |
| cmake와 libpthread (0) | 2020.06.04 |
| 파이썬에서 뒤로 루프하는 법? (0) | 2020.06.04 |
| 부울 필드의 경우 getter / setter의 명명 규칙은 무엇입니까? (0) | 2020.06.04 |






