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.