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

258
Vistas
How can I fix import/no-default-export without switching to Typescript?

I'm trying to put all my selectors in an external JS file and then import them in to my page object when I need them e.g. :

Home-page-selectors.js:
    export default {
      headerLinks: 'header a',
      contactUsLink: "header a[href='/contact-us']",
    }

Home-page.js includes import selectors from '../test-data/home-page-data.js' I can then do things like cy.get(selectors.headerLinks)

The problem is when I run my lint tasks I get an error from Home-page-selectors.js saying

error Prefer named exports import/no-default-export

How can I fix this error? I know multiple ways I can do it in TypeScript but unfortunately switching to TS isn't an option due to a number of plugins we use not being compatible.

about 4 years ago · Juan Pablo Isaza
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