简体   繁体   English

如何摆脱更漂亮/更漂亮的错误

[英]how to get rid of prettier/prettier error

This is the error I am receiving when yarn deploying.这是我在部署纱线时收到的错误。 Cant seem to figure out what happened.似乎无法弄清楚发生了什么。 I deployed 5 minutes before this without any issues.我在此之前部署了 5 分钟,没有任何问题。

Error: Command failed with exit code 1: node_modules/.bin/next build
warn  - The `target` config is deprecated and will be removed in a future version.
See more info here https://nextjs.org/docs/messages/deprecated-target-config

Failed to compile.

./components/layout/Header.tsx
66:117  Error: Insert `⏎··········`  prettier/prettier
67:1  Error: Delete `··`  prettier/prettier

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
info  - Loaded env from /Users/coreykaminski/VCXNFT-1/landing-page/.env.local
info  - Checking validity of types...

error Command failed with exit code 1.

This is the eslintrc.js这是 eslintrc.js

plugins: ["@typescript-eslint"],
extends: ["standard", "plugin:prettier/recommended", "plugin:node/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
  ecmaVersion: 12,
},
rules: {
  "max-len": ["error", { code: 160, ignoreUrls: true }],
  "node/no-unsupported-features/es-syntax": ["error", { ignores: ["modules"] }],
  "prettier/prettier": [
    "error",
    {
      endOfLine: "auto",
    },
  ],
},
};

this is the json这是json

 "prettier/prettier": [
      "error",
      {
        "endOfLine": "auto"
      }


"plugins": ["@typescript-eslint", "react"],
  "rules": {
    "prettier/prettier": ["error", {}, { "usePrettierrc": true }],

npx prettier --write ./components/layout/Header.tsx or disable prettier eslint. npx prettier --write ./components/layout/Header.tsx或禁用更漂亮的 eslint。

"prettier/prettier": [
    0,
    {
      endOfLine: "auto",
    },
  ],

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

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