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

chore(lint-config): prettier/@typescript-eslint must be removed #961

Merged
merged 1 commit into from Jan 24, 2023

Conversation

MikeRossXYZ
Copy link
Contributor

@MikeRossXYZ MikeRossXYZ commented Jan 20, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

When running npm run lint locally, the command does not complete due to an error:

$ npm run lint

> @nestjs/mapped-types@1.2.0 lint
> eslint 'lib/**/*.ts' --fix


Oops! Something went wrong! :(

ESLint: 8.32.0

Error: Cannot read config file: /Users/rossm/projects/mapped-types/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: /Users/rossm/projects/mapped-types/.eslintrc.js
    at Object.<anonymous> (/Users/rossm/projects/mapped-types/node_modules/eslint-config-prettier/@typescript-eslint.js:1:7)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
    at Module.load (node:internal/modules/cjs/loader:1081:32)
    at Module._load (node:internal/modules/cjs/loader:922:12)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at module.exports [as default] (/Users/rossm/projects/mapped-types/node_modules/import-fresh/index.js:31:59)
    at loadJSConfigFile (/Users/rossm/projects/mapped-types/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2562:47)
    at loadConfigFile (/Users/rossm/projects/mapped-types/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2646:20)
    at ConfigArrayFactory._loadConfigData (/Users/rossm/projects/mapped-types/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2963:42)

Issue Number: 962

What is the new behavior?

The fix for this error is exactly as the error message prescribes: remove prettier/@typescript-eslint from the eslint configuration.

The linting action runs successfully.

Does this PR introduce a breaking change?

  • Yes
  • No

…prettier

The package referenced in .eslintrc.js is no longer required and actively produces an error when
> @nestjs/mapped-types@1.2.0 lint
> eslint 'lib/**/*.ts' --fix is ran.
Copy link
Member

@jmcdo29 jmcdo29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @kamilmysliwiec should be a straightforward merge to fix the linting error

@kamilmysliwiec kamilmysliwiec merged commit 7a8322e into nestjs:master Jan 24, 2023
@kamilmysliwiec
Copy link
Member

lgtm

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 this pull request may close these issues.

None yet

4 participants