Skip to content

Updating Prettier causes many files to become invalid #3712

@Download

Description

@Download

You want to:

  • report a bug
  • request a feature

Current behaviour

When updating Prettier, it starts to report that many files are invalid.
This might be caused by Prettier changing it's mind about some rule default values?

Steps to reproduce (if the current behaviour is a bug)

  • Git clone this project
  • npm install
  • npm outdated
  • Update all dependencies except for mocha and prettier
  • npm run format:check
  • Observe: prettier has no complaints
  • npm uninstall --save-dev prettier && npm install --save-dev prettier
  • npm run format:check
  • Observe: Prettier complains aboit a bunch of files
C:\ws\socketio>npm outdated
Package   Current  Wanted  Latest  Location
mocha       3.5.3   3.5.3   8.2.1  socket.io
prettier   1.19.1  1.19.1   2.2.0  socket.io

C:\ws\socketio>npm uninstall --save-dev prettier && npm install --save-dev prettier
removed 1 package and audited 326 packages in 1.548s

21 packages are looking for funding
  run `npm fund` for details

found 3 vulnerabilities (2 low, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
+ prettier@2.2.0
added 1 package from 1 contributor and audited 327 packages in 2.27s

21 packages are looking for funding
  run `npm fund` for details

found 3 vulnerabilities (2 low, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

C:\ws\socketio>npm run format:check

> socket.io@3.0.3 format:check C:\ws\socketio
> prettier --check "lib/**/*.ts" "test/**/*.ts"

Checking formatting...
[warn] lib\client.ts
[warn] lib\index.ts
[warn] lib\namespace.ts
[warn] lib\parent-namespace.ts
[warn] lib\socket.ts
[warn] test\socket.io.ts
[warn] test\support\util.ts
[warn] Code style issues found in the above file(s). Forgot to run Prettier?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions