首页 > 解决方案 > Cypress eslint 插件:cypress/recommended 如何忽略“unexpected token =”?

问题描述

我正在尝试在我的 cypress 项目上运行 eslint,但它一直失败

2:19 错误解析错误:意外令牌 =

有没有办法全局忽略错误?如果我不运行 linting,我的代码可以正常工作:

class CardPage {
  cardPageURL = "I've removed the url";
  
  visit() {
    cy.visit(this.cardPageURL);
  }
}

export const cardPage = new CardPage();

这是我的 .eslintrc.js 文件

module.exports = {   extends: ["plugin:cypress/recommended", "prettier"], };

标签: javascripteslintcypress

解决方案


推荐阅读