¿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
¿Cómo puedo desactivar el error de creación de JavaScript en Visual Studio 2017?
6 answers
Creo, encontrar la solución:
- Abierto
Tools > Options
- Vaya a
Text Editor > JavaScript/TypeScript > EsLint
(en VS2017 15.8 esLinting
noEsLint
) - Establezca
Enable ESLint
enFalse
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
- Abierto
Tools > Options
- Vaya a
Text Editor > JavaScript/TypeScript > Code Validation
- Establezca
Enable JavaScript errors
enfalse
- o
Enable JavaScript errors
atrue
yShow errors as warnings
atrue
necesitaba reiniciar Visual Studio para que esto tenga efecto.
Opción 2: Opciones > Linting
Hay otra opción a continuación que le permitirá editar su linting global valores:
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
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:
- Haga clic en su web.csproj file
- En la primera
<PropertyGroup>
añadir la siguiente entrada:<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
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.
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..!!!
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
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