fisker Cheung

Results 1278 comments of fisker Cheung

I didn't know we are shipping commonjs version, maybe something wrong in https://app.unpkg.com/[email protected]/files/lib/index.js#L35 add a debugger to check what's imported should see the problem, not near a computer, can't tell.

I think it's bug in build script? ``` > await import('./lib/index.mjs') [Module: null prototype] { parsers: {}, printers: { estree: { canAttachComment: [Function: Op], embed: [Function: oc], experimentalFeatures: [Object], getCommentChildNodes:...

Ah. Understant the problem now, it uses `prettier/parser-babel`, but it actually importing the UMD version, so named import won't work. The new export printer solution doesn't work for Prettier v2...

We(jest-light-runner) need this feature too, for now we just added a different entry https://github.com/nicolo-ribaudo/jest-light-runner/blob/c47d1baefd7ce80c25b41290582a6a173b5e69ec/package.json#L10

> - Handle trailing whitespaces: > - `'a '`(one space) should not match `'a '`(two spaces). > - `'a \ '` matches `'a ' Quote from https://github.com/kaelzhang/node-ignore/tree/master?tab=readme-ov-file#why-another-ignore. It seems spaces...

> For example, an array does not have a width property, so if we see that used, we would assume dimensions is not an array, and ignore it. I like...

Here is how the cursor node is located https://github.com/prettier/prettier/blob/c2ad588ec38f204427cad076fa58d608a3e9e02d/src/main/get-cursor-node.js#L20, Prettier will insert two `prettier.doc.builders.cursor` around that node when printing node.

Hello, @apollisa The test fails because the AST changed, run `AST_COMPARE=1 yarn test` you'll see the failure on local.

I'm not sure if this will be accepted, but if it's expected to produce different AST, you'll need change the old shape to new shape in https://github.com/prettier/plugin-php/blob/main/src/clean.mjs

Looking at how `printAttrs` is called, I think you can ```js if (node.kind === 'arrowfunc' || node.kind === 'parameter' /* || other kinds */) { // Update newObj.attrGroups } ```...