fisker Cheung

Results 1278 comments of fisker Cheung

As I understand, the CLI test heavily relay on child process, the Jest part only do assertion, not really important, also Prettier currently still runs on Jest, stay with Jest...

I thought about it before, my concern is transforming, I don't want the test lib to do transforming which can potentially hide bugs. I haven't check how vitest works, but...

While we are on this, please support `"off"` https://github.com/prettier/prettier/blob/75bdb5d5de50308c396657dcbda70b60798f5d09/src/config/editorconfig/editorconfig-to-prettier.js#L48 Though there is an open issue about this, https://github.com/prettier/prettier/issues/17514, let's just align with the current behavior of Prettier.

> is there an issue in editorconfig's repo tracking that? As far as I know, there is not. > Is "off" documented in Prettier's docs? No, it's undocumented, but it's...

This is hard to detect, but ```js 1e13 - new Date(); // -> number 1e13 + new Date(); // -> string ```

Tested, the bundle remains the same.

I can't find that serializer.. and I forgot where I used. And Jest didn't document how the ESM serializer should work.

This is strange, since we [unwrap `TSParenthesizedType` when parsing](https://github.com/prettier/prettier/blob/02200375bc2dc5ec7e6152ef82371ecace820fd3/src/language-js/parse/postprocess/index.js#L80), they have the same AST in perspective of printer. I wounder if this is a TypeScript bug.

Related https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2165

#### Fail ```js array.splice(index, 1, newValue); ``` #### Pass ```js array[index] = newValue; ``` ```js array = array.with(index, newValue); ```