fisker Cheung

Results 1275 comments of fisker Cheung

Simply, we can add a property to https://github.com/prettier/prettier/blob/a84fe9866b935721fb78b2df6a865f7a79a580e8/src/language-html/embed.js#L58-L61 from https://github.com/prettier/prettier/blob/a84fe9866b935721fb78b2df6a865f7a79a580e8/src/language-html/utils/is-vue-sfc-with-typescript-script.js#L4-L18 But feels hacky.

It was mentioned in #12584 , but we didn't notice https://github.com/prettier/prettier/pull/12584#issuecomment-1100732822

@seiyab CSS **Prettier 3.7.4** [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAdKB6AVAAkLwbgIHuHFGknlmUWE5YbroC0jAZhBEjsOjjpADYQATpyFwAJgG4eObPioLqi5bXpQAviAA0ICAAcYAS2gBnZKACGQoRADuABSsIzKC-1sWAnmZ0AjIRZgANZwMADKFgC2cAAyhlBwyCxuJnA6EL4AVnBgMADqAXrIIHpiqUIAbol+AcGhYXqB8QDmyDBCAK5pIKmRhm2d3XAAHnpwQobRsG4A8mMBMML2ECaGRtDFCOLaICPzkwgwbgAq41BWhnAuyfypOqtQzfxwAIodEPBJKd2ZJsNhLWebw+iSQNzuIAAju94PYbHoXCALCZGAkJBIdu0LIZ+C0AMIQSKRCzFNz8HYPJ5wACCMHahl8HVh4ziCS+t26AAsYJF+HlOWsro0wHAws41oYKmtPMUwCYfCAKl0AJJQcSHMJgCYGalqsIwTzPdkQ0orOAFCxFFClK7jKo7LYzFis0EgfgsHbxcowOEWZrE43dRpCcqy+U7UrxfKGcQwTnIAAcAAYdGJoYYxL7-SSwd8dEdfHkY3HkAAmHQdVLHCy+a553aRXwSdXiGIWR4dP1wABiwmJdJapKZEBA6nUQA) ```sh --parser css ``` **Input:** ```css /* 😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄 */ --foo: { color: red; /* 😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄 */ } ``` **Output:** ```css /* 😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄 */ --foo:...

Parser not supported it yet, https://github.com/typescript-eslint/typescript-eslint/issues/11389 Mean while, you can try use `babel-ts` or [`oxc-ts`](https://github.com/prettier/prettier/tree/main/packages/plugin-oxc#prettierplugin-oxc) parser

Personally, I prefer `Class{Declaration,Expression}` and `ExportNamedDeclaration` range to include `decorators`. There was a discussion on ESTree https://github.com/estree/estree/issues/315. The range issue also raised on Meriyah https://github.com/meriyah/meriyah/issues/421 Currently, Prettier extends the range...

Looks like we can also improve the normal function **Prettier 3.6.2** [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAKAOlABFg9LrAMwgkwEosBeAPi2AF9NNCBXKMGAS2iwEMMo6GPiIlydeiAA0ICAAcu0AM7JQvAE7qIAdwAKGhCpS8ANtt4BPFTIBG63mADWcGAGVeAWzgAZTlDjIhKZKcDIQNgBWcBwA6vZyyCBy6nAh6gBuAbb2Ti6ucg5+AObIMOosoSAhHpyl5ZVwAB5ycOqcXrCmAPIt9jAQ6roQSpyKUIkIACbSIE297QgwpgAqrVAanKmBwZUjUEUmcACKLBDw2yYhMhFKja7FhydnAUhBl5UAjqfwulpyRiBeEoALT+OCTcEzMq8TgmYoAYQgHg8vESphMMz2BzgAEEYGVODYWD9Wr5-BcriAABYwDwmGJU0apApgOCuQyjTjpUYWRJgJTWEDpCoASSgENgrjAbQUOPFrhgFkOFMqyWGcDivASKGSqVamRmfjSMF+vCKKJVMgK6jSiRsvBscAxVrasBinEmMCpyAAHAAGGQpL6cFKm82o147GRLGzuz3epAAJhkLBCywdRjelLgHkdkwhk28vH2LDNcAAYgMUfjimjiRAQPR6EA) ```sh --parser babel ``` **Input:** ```jsx ( // foo ) => {} function a( // foo )...

This seems not looking good either ``` function a( // foo ) { return } ```

As I tested, the value of Regex didn't change. So changed `Bug` to `Suggestion`.