Closed jmg1138 closed 3 years ago
user@luter:~/git/api.recipe.report$ yarn run linter
yarn run v1.22.14
$ eslint src/** --ext .js,.jsx,.ts,.tsx
Oops! Something went wrong! :(
ESLint: 7.32.0
Error: Cannot read config file: /home/user/git/api.recipe.report/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: /home/user/git/api.recipe.report/.eslintrc.js
at Object.<anonymous> (/home/user/git/api.recipe.report/node_modules/eslint-config-prettier/@typescript-eslint.js:1:69)
at Module._compile (/home/user/git/api.recipe.report/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19)
at module.exports (/home/user/git/api.recipe.report/node_modules/import-fresh/index.js:32:59)
at loadJSConfigFile (/home/user/git/api.recipe.report/node_modules/@eslint/eslintrc/lib/config-array-factory.js:225:16)
at loadConfigFile (/home/user/git/api.recipe.report/node_modules/@eslint/eslintrc/lib/config-array-factory.js:309:20)
at ConfigArrayFactory._loadConfigData (/home/user/git/api.recipe.report/node_modules/@eslint/eslintrc/lib/config-array-factory.js:609:42)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Version 8.0.0 of eslint-config-prettier
had breaking changes in how the configs are set.
https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21
We were using eslint-plugin-prettier
, the changes were pretty simple:
In the .eslintrc.js
file, under the extends
array, I replaced this ...
'prettier',
'prettier/@typescript-eslint',
with this...
'plugin:prettier/recommended`,
Fix is in commit 41e282aa921a5591190f5800d6fe6a68a77b9e8f
After updating dependencies, the linter is broken. There were breaking changes with something related to eslint or prettier.