Boshen

Results 130 issues of Boshen

## I'm submitting a... [ ] Regression [x] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support...

potential issue

I'm currently making snapshot tests with non-ansi theme: ``` miette::GraphicalReportHandler::new_themed(miette::GraphicalTheme::unicode_nocolor()) ``` but it produces ansi characters for the links: ``` ]8;;https://eslint.org/docs/rules/no-cond-assign\(link)]8;;\ ``` It seems like the characters are hard code...

question

### Environment information [Playground](https://play.rome.tools/?code=declare+class+C+%7B%0A+++++readonly+name+%3D+%22initializer%22%3B%0A%7D&lineWidth=80&indentStyle=tab&quoteStyle=double&indentWidth=2&sourceType=module&typescript=true&jsx=true#ZABlAGMAbABhAHIAZQAgAGMAbABhAHMAcwAgAEMAIAB7AAoAIAAgACAAIAAgAHIAZQBhAGQAbwBuAGwAeQAgAG4AYQBtAGUAIAA9ACAAIgBpAG4AaQB0AGkAYQBsAGkAegBlAHIAIgA7AAoAfQA=) Found in [Babylon.js](https://github.com/BabylonJS/Babylon.js/blob/master/packages/tools/playground/public/libs/babylon.manager.d.ts#L1863) ### What happened? ``` declare class C { readonly name = "initializer"; } ``` errored with ``` Initializers are not allowed in ambient...

S-Bug: confirmed
L-TypeScript
A-parser

### Environment information [Playground](https://play.rome.tools/?code=const+%7B%0A++a+%3D+%28arg%29+%3D%3E+%7B%7D%2C%0A++b+%3D+%28arg%29+%3D%3E+%7B%7D%2C%0A%7D+%3D+props%3B&lineWidth=80&indentStyle=tab&quoteStyle=double&indentWidth=2&sourceType=module&typescript=true&jsx=true#YwBvAG4AcwB0ACAAewAKACAAIABhACAAPQAgACgAYQByAGcAKQAgAD0APgAgAHsAfQAsAAoAIAAgAGIAIAA9ACAAKABhAHIAZwApACAAPQA+ACAAewB9ACwACgB9ACAAPQAgAHAAcgBvAHAAcwA7AA==) This is found inside [material-ui](https://github.com/mui/material-ui/blob/master/packages/mui-base/src/AutocompleteUnstyled/useAutocomplete.js). ### What happened? ``` const { a = (arg) => {}, b = (arg) => {}, } = props; ``` errored...

bug: confirmed
L-JavaScript
A-parser
S-Stale

### Environment information [Playground](https://play.rome.tools/?code=let+a+%3D+b+%7C%7C+false%0Alet+c+%3D+d+%7C%7C+true%0A&lineWidth=80&indentStyle=tab&quoteStyle=double&indentWidth=2&sourceType=module&typescript=true&jsx=true#bABlAHQAIABhACAAPQAgAGIAIAB8AHwAIABmAGEAbABzAGUACgBsAGUAdAAgAGMAIAA9ACAAZAAgAHwAfAAgAHQAcgB1AGUACgA=) ### What happened? These expressions should not trigger `js/useSimplifiedLogicExpression` ``` let a = b || false let c = d || true ``` ``` warning[[js/useSimplifiedLogicExpression](https://rome.tools/docs/lint/rules/useSimplifiedLogicExpression/)]: Logical...

S-Bug: confirmed
A-linter
L-JavaScript

### Environment information [Playground](https://play.rome.tools/?code=function+foo%28%29+%7B%0A++return%0A%0A++if+%28x%29+%7B%0A++++a%0A++%7D%0A%0A++bar%28%29%0A%0A++while%28y%29+%7B%7D%0A%0A++b%0A%7D&lineWidth=80&indentStyle=tab&quoteStyle=double&indentWidth=2&sourceType=module&typescript=true&jsx=true#ZgB1AG4AYwB0AGkAbwBuACAAZgBvAG8AKAApACAAewAKACAAIAByAGUAdAB1AHIAbgAKAAoAIAAgAGkAZgAgACgAeAApACAAewAKACAAIAAgACAAYQAKACAAIAB9AAoACgAgACAAYgBhAHIAKAApAAoACgAgACAAdwBoAGkAbABlACgAeQApACAAewB9AAoACgAgACAAYgAKAH0A) ### What happened? Given dead code separated by control blocks, it outputs every single node/identifier/statement as a separate diagnostic. ``` function foo() { return if (x)...

bug: unconfirmed

### What happened? In non-async context (Module), ```javascript function foo() { await bar; } ``` await expression shows ``` error[SyntaxError]: Illegal use of `await` as an identifier inside of a...

bug: confirmed
L-JavaScript
A-parser

### Description After #1909 is done, we should probably look into [Fuzz Testing](https://rust-fuzz.github.io/book/introduction.html) to make the Parser panic resilient. ### Setup https://github.com/Boshen/tools/commit/c0f33d66b8e2b2f114310e945b64400a061d4526 ``` cargo install cargo-fuzz cd crates/rome_js_parser cargo fuzz...

task
L-JavaScript
A-parser

### Environment information [PlayGround](https://play.rome.tools/?code=declare+module+%27x%27+%7B%0A++export+default+function+%28option%3A+any%29%3A+void%0A%7D&lineWidth=80&indentStyle=tab&quoteStyle=double&quoteProperties=as-needed&trailingComma=all&indentWidth=2&sourceType=module&enabledNurseryRules=true&typescript=true&jsx=true#ZABlAGMAbABhAHIAZQAgAG0AbwBkAHUAbABlACAAJwB4ACcAIAB7AAoAIAAgAGUAeABwAG8AcgB0ACAAZABlAGYAYQB1AGwAdAAgAGYAdQBuAGMAdABpAG8AbgAgACgAbwBwAHQAaQBvAG4AOgAgAGEAbgB5ACkAOgAgAHYAbwBpAGQACgB9AA==) ### What happened? ```typescript declare module 'x' { export default function (option: any): void } ``` reports ` ✖ expected an identifier, an array pattern, or...

S-Bug: confirmed
A-parser

### What problem does this feature solve? https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html

enhancement