Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "prettier/@typescript-eslint" has been merged into "prettier" in eslint-config-prettier 8.0.0 #114

Open
theclive opened this issue Mar 1, 2021 · 2 comments · May be fixed by #116

Comments

@theclive
Copy link

theclive commented Mar 1, 2021

Overview

We are having an issue using prettier-standard alongside eslint & eslint-config-prettier. Upon running prettier-standard --lint we receive an error which seems to be related to this change in eslint-config-prettier. This error does not present when eslint-config-prettier is removed from our package.json.

Steps to re-create

  • In a clean folder run npm init
  • Run npm install --save-dev prettier-standard eslint eslint-config-prettier
  • Add this script to package.json: "lint": "prettier-standard --lint *"
  • run npm run lint

Expected results

➜ npm run lint

> recreate-prettier-error@1.0.0 lint /Users/clive/Developer/learning/recreate-prettier-error
> prettier-standard --lint *

package-lock.json 164ms
package.json 5ms
All matched files use Standard code style!

Actual results

➜ npm run lint

> recreate-prettier-error@1.0.0 lint /Users/clive/Developer/learning/recreate-prettier-error
> prettier-standard --lint *

Error: Cannot read config file: /Users/clive/Developer/learning/recreate-prettier-error/node_modules/eslint-config-prettier/@typescript-eslint.js
Error: "prettier/@typescript-eslint" has been merged into "prettier" in eslint-config-prettier 8.0.0. See: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21
Referenced from: BaseConfig
    at Object.<anonymous> (/Users/clive/Developer/learning/recreate-prettier-error/node_modules/eslint-config-prettier/@typescript-eslint.js:1:7)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at module.exports (/Users/clive/Developer/learning/recreate-prettier-error/node_modules/import-fresh/index.js:32:59)
    at loadJSConfigFile (/Users/clive/Developer/learning/recreate-prettier-error/node_modules/@eslint/eslintrc/lib/config-array-factory.js:225:16)
    at loadConfigFile (/Users/clive/Developer/learning/recreate-prettier-error/node_modules/@eslint/eslintrc/lib/config-array-factory.js:309:20)
    at ConfigArrayFactory._loadConfigData (/Users/clive/Developer/learning/recreate-prettier-error/node_modules/@eslint/eslintrc/lib/config-array-factory.js:609:42)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! recreate-prettier-error@1.0.0 lint: `prettier-standard --lint *`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the recreate-prettier-error@1.0.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/clive/.npm/_logs/2021-03-01T11_21_47_980Z-debug.log
@theclive theclive linked a pull request Mar 29, 2021 that will close this issue
@einSelbst
Copy link

I'm having the same problem but this project seems unmaintained, no updates for more than a year unfortunately.

@N1ck0lay
Copy link

Read this:
https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21

in my case, in .eslintrc file I had:

  "extends": [
    "standard",
    "standard-react",
    "plugin:prettier/recommended",
    "prettier/standard",
    "prettier/react"
  ],

and now I have:

  "extends": [
    "standard-react",
    "plugin:prettier/recommended"
  ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants