¿Cómo deshabilitar el error de compilación de Javascript en Visual Studio 2017?


Acabo de actualizar Visual Studio 2017 de RC a final.
No obtuve el siguiente error, pero recientemente obtuve este error
Al construir el proyecto, obtengo el siguiente error y evita que el proyecto web se inicie:

Severity    Code    Description Project File    Line    Suppression State
Error   eqeqeq  (ESLint) Expected '===' and instead saw '=='.   VistaBest.Shop.Web  C:\***\Request.js   21

Error de JavaScript

¿Cómo puedo desactivar el error de creación de JavaScript en Visual Studio 2017?

Author: Mohammad Dayyan, 2017-03-10

6 answers

Creo, encontrar la solución:

  1. Abierto Tools > Options
  2. Vaya a Text Editor > JavaScript/TypeScript > EsLint (en VS2017 15.8 es Linting no EsLint)
  3. Establezca Enable ESLint en False

Desactivar ESLint

 208
Author: Mohammad Dayyan,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-08-21 13:46:53

En Visual Studio 2017 (v 15.8.0):

Opción 1: Opciones > Errores JS

  1. Abierto Tools > Options
  2. Vaya a Text Editor > JavaScript/TypeScript > Code Validation
  3. Establezca Enable JavaScript errors en false
  4. o Enable JavaScript errors a true y Show errors as warnings a true

necesitaba reiniciar Visual Studio para que esto tenga efecto.

Opciones > Errores de JS

Opción 2: Opciones > Linting

Hay otra opción a continuación que le permitirá editar su linting global valores:

Opciones > JS Linting

Opción 3: .eslint file

También puede crear un archivo llamado .eslintrc en la raíz de su proyecto.

Opción 4: Comandos de ESLint en el archivo

Ver la respuesta de @user9153924


Recursos

 24
Author: Brad,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-08-17 19:52:04

Probé la solución de Mohammad pero no funcionó. Me las arreglé para trabajar haciendo lo siguiente:

  1. Haga clic en su web.csproj file
  2. En la primera <PropertyGroup> añadir la siguiente entrada: <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
 13
Author: Rafael dos Santos,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-04-07 20:07:38

Agregue /*eslint eqeqeq: ["error", "smart"]*/ a la primera línea de su código Javascript para eliminar los errores. https://eslint.org/docs/rules/eqeqeq

Siguiendo la solución de Mohammad se desactivará ESLint para la comprobación de sintaxis. Esto funciona en VS2015 y debería funcionar en versiones posteriores.

 9
Author: user9153924,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-12-29 17:32:08

Probé la solución de Mohammad, pero sin suerte, seguí la respuesta de Rafeel y en lugar de agregar su ejemplo de código sugerido, eliminé el siguiente código de web .csproj y finalmente pude construir y ejecutar mi proyecto. Había dos lugares donde deberías eliminar eso en el mismo archivo. Aún así, no tengo ni idea de cómo el código eliminado afectará a mi solución.

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />

Espero que esto también ayude a alguien a salvar el día..!!!

 0
Author: SilentCoder,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-12-13 13:01:33

En VS 2017 Enterprise, debería ser así:

introduzca la descripción de la imagen aquí

 -4
Author: Scarlett Le,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-11-28 04:08:23