fisker Cheung
fisker Cheung
Currently `getPropertyName` always [ return `string`](https://github.com/mysticatea/eslint-utils/blob/23709f84c8e21f1a38f61ad689c82a8763e0737f/src/get-string-if-constant.js#L21) (bigint is also possible when it's `Literal`), but property can be a `symbol` ```js bar[Symbol.iterator]() ``` This can be calculated by `getStaticValue`. BTW: [Similar...
Similar to [`getStaticValue`](https://eslint-utils.mysticatea.dev/api/ast-utils.html#getstaticvalue), but only tell the type. For example `` `a${foo}` `` -> `string` `[...foo]` -> `array` `{foo}` -> `object` `!foo` -> `boolean` ... It's useful to make some...
```javascript (function get() { fetch('https://xixi-haha.never.eu.org/') .then(r => r.text()) .then(console.log) .then(() => new Promise(r => setTimeout(r, 5000))) .then(get) })() ``` 不断学习,进步
## Description To ship ESM version for Node.js, the original `parsers` use dynamic require to load plugins, we have to change it to `import()`. I don't think it's a good...
They are available on Node.js 16, but esbuild won't polyfill for Node.js 14, we do similar thing in `main` branch by using `esbuild -> babel -> esbuild`. But this will...
## Description Improve string replace speed with `magic-string`. 18s -> 0.8s ## Checklist - [ ] I’ve added tests to confirm my change works. - [ ] (If changing the...
- [ ] I’ve added tests to confirm my change works. - [ ] (If changing the API or CLI) I’ve documented the changes I’ve made (in the `docs/` directory)...
**Prettier 2.7.1** [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEwA6VOYBmEEANHgRZgEYCGATuVAL6YC8m9cAjgK4CWXABQByWiICUAbjx5+AWwAOEellz4iJJpQ11GeVoXoR5mHCFrmZUPPIgATXgBs4AOjgAPZarTtsVYjIqKj0mZms8T281AK1g3QYwqRBSEAhFGH50ZFAGYwB3AAUGBDRkCyd82gBPMtTqelowAGs4GABlWnk4ABl+KDhkQlonNDh6xpa29sUm-oBzZBh6XnGQOHlqOHt7bZ7aKHneWnm4ADEVeVoYTMPy2l4YCBSQAAsYeScAdVf+eDRZmA4O1Sn9+AA3P7VcpgNB1ED9MaqQqNeZXIYjMapABWaA87QWLgAirwIPAMaM1rN6EjynQtk4Xop6P0YF9+PYYK9kAAOAAMqWZEDGX0ainKzLgSPBg1SfDJcBR6TKKFoaAAtANttsXlw+IJFaj0UhhpTUmN5Pwlis1mhCXASQqKViQDBaNR2ZzuUgAEypZa0fhOBYAYRMxvWaAArC9eGMACrulWml3g1YASSgu1g7TALIyAEEs+0YNUXM64MxmEA) ```sh --parser babel ``` **Input:** ```jsx const { foo, bar, } = require('a'); import { foo, bar, } from "a"; module.exports = { foo, bar, };...
During #13400, I found that we are checking `node.description` for `EnumTypeDefinition`, `UnionTypeDefinition`, and `ScalarTypeDefinition`, but we don't have any test with `description`.
### Environment Node version: 18.8.0 npm version: N/A Local ESLint version: 8.23.1 Global ESLint version: A/A Operating System: Windows ### What parser are you using? Default (Espree) ### What did...