Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

126
Vistas
es lint max length rule disabling is not working

I am trying to disable eslint rule in a typescript file. I have a regular expression which contains more than 500 characters. So it's generated an eslint warning. Since this is a regular expression, better way is to add an eslint comment before declaring the regular expression only for that line. So my attempt is as below.

/* eslint-disable-next-line max-len */
export const URI_REGEX = "" // something which is very long

But still this is not working. I could see the eslint warning as This line has a length of 509. Maximum allowed is 270. So how can I remove this warning?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Which version of eslint do you have? I think you can can try //eslint-disable-line for disable all rules for the specific line, or using // eslint-disable max-len

Taking from here: https://github.com/prettier/prettier/issues/3375

Edit

I think you can also add a ignoreRule for you speisifc regex. See here the docs: https://eslint.org/docs/rules/max-len of ignorePattern

about 4 years ago · Juan Pablo Isaza Denunciar

0

Not sure, your method should be working but can you give this a try by wrapping it?

/* eslint-disable max-len */ 
   export const URI_REGEX = "" // something which is very long
/* eslint-enable max-len */
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda