简体   繁体   English

如何为整个项目禁用 ESLint jsx-a11y/alt-text

[英]How to disable ESLint jsx-a11y/alt-text for entire project

Does anyone know how to disable this in the eslintrc.json file for entire Next.js project?有谁知道如何在整个 Next.js 项目的 eslintrc.json 文件中禁用它?

在此处输入图像描述

I have added this, but it does not work:我添加了这个,但它不起作用:

{
  "extends": ["next/core-web-vitals", "prettier"],
  "rules": {
    "prefer-const": "error",
    "indent": ["error", 2],
    "jsx-a11y/img-has-alt": "off"
  }
}

Try this instead: "jsx-a11y/alt-text": [0] , see the docs for more info试试这个: "jsx-a11y/alt-text": [0] ,查看文档了解更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM