相关疑难解决方法(0)

构建下一个 js 应用程序时出现“需要禁用某些 ESLint 规则”错误

我想将我的Next.js文件部署到服务器上。当我点击命令时npm run build它显示错误

需要禁用一些 ESLint 规则?在此处了解更多信息: https ://nextjs.org/docs/basic-features/eslint#disabling-rules

我无法找到错误,因为应用程序在本地主机中正常工作,但是当我想要构建时,它显示错误。我的文件中的包package.json

{
  "name": "yourguide-next-frontend",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "node server.js",
    "build": "next build",
    "start": "NODE_ENV=production node server.js"
  },
  "dependencies": {
    "@emotion/react": "^11.10.0",
    "@emotion/server": "^11.10.0",
    "@emotion/styled": "^11.9.3",
    "@mui/material": "^5.10.2",
    "@tinymce/tinymce-react": "^4.2.0",
    "cjs": "^0.0.11",
    "cookies": "^0.8.0",
    "js-cookie": "^3.0.1",
    "next": "12.2.3",
    "react": "18.2.0",
    "react-bootstrap": "^2.4.0",
    "react-dom": "18.2.0",
    "tinymce": "^6.1.2"
  },
  "devDependencies": {
    "@next/eslint-plugin-next": "^12.2.5",
    "eslint": "8.20.0",
    "eslint-config-next": "12.2.3"
  }
}
Run Code Online (Sandbox Code Playgroud)

我不知道ESLint rules. 请给我这个问题的解决方案。

eslint next.js

8
推荐指数
2
解决办法
2万
查看次数

禁用create-react-app提供的ESLint

create-react-appv3.0.0已发布。它在内部支持TypeScript棉绒。(太好了!)我想我了解TSLint处于打开状态的情况,并计划用ESLint替换它,但现在还不行。

如何禁用掉毛步骤react-scripts start

/* eslint-disable */ 其他人不是我要找的人。

更新:根据以下讨论,看起来没有办法操纵内部ESLint。因此,我的问题的答案将是“你不能”

https://github.com/facebook/create-react-app/issues/808

typescript reactjs eslint create-react-app

5
推荐指数
5
解决办法
1353
查看次数

标签 统计

eslint ×2

create-react-app ×1

next.js ×1

reactjs ×1

typescript ×1