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

pretty-quick does not work when "type": "module" is declared in package.json in a TypeScript project #139

Open
jpangelle opened this issue Oct 6, 2021 · 1 comment

Comments

@jpangelle
Copy link

Description

When I use "type": "module" in package.json and use `pretty-quick, I get this error:

node:internal/errors:811
        (frm) => !StringPrototypeStartsWith(frm.getFileName(),
                  ^

TypeError: String.prototype.startsWith called on null or undefined
    at startsWith (<anonymous>)
    at node:internal/errors:811:19
    at Array.filter (<anonymous>)
    at node:internal/errors:809:16
    at prepareStackTrace (node:internal/errors:96:12)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:38)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at importFresh (/<path>/node_modules/prettier/third-party.js:91:60)

Dependencies

"husky": "^6.0.0"
"prettier": "^2.4.1"
"pretty-quick": "^3.1.1"

Husky Command

npx pretty-quick --staged

@JounQin
Copy link
Member

JounQin commented Jan 16, 2024

Not sure to understand what's the issue.

A minimal but runnable online reproduction is required.

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

No branches or pull requests

2 participants