Cyril Junod
Cyril Junod
_Prettifying_ with flow parser JSX with `\r\n` before or after text outputs a whitespace. This issue was originally reported on esbenp/prettier-vscode#63. ### Input settings: - `crlf` line endings - flow...
Formatting the first node of a file formats the entire file. First node has to start at 0 `echo "call( ); call ( )" | prettier --range-start 1 --range-end 2`...
Trying to range format an ImportDeclaration throws `TypeError: Cannot read property 'node' of undefined` `echo "import x from 'x'" | prettier --range-start 1 --range-end 2` Seems [this list](https://github.com/prettier/prettier/blob/f702c2c61484241f1d0ca33a6603dcdcc0102256/index.js#L156-L183) is base...
`echo " " | prettier --range-start 1 --range-end 2` `TypeError: Cannot read property 'node' of undefined` Expected: Not an error at least, same output or striped selected white-spaces
` echo ".x{} " | prettier --parser postcss --range-end 4` throws: `TypeError: Cannot read property 'line' of undefined` at [lineColumnToIndex](https://github.com/prettier/prettier/blob/3474056b36f8c2e8a8418f16731257b37d8f8081/src/util.js#L265)
`echo '{NPC{life}}' | prettier --parser graphql --range-end 3` throws: `RangeError: Maximum call stack size exceeded` I will update with more info once I have.
`echo '{"a":1, "b":2}' | prettier --parser json --range-start 5 --range-end 6` throws: `SyntaxError: (json-to-ast) Unexpected end of JSON (NaN:undefined)` I will update with more info once I have.
Trying to format an ObjectExpression -- with at least 2 props -- throws. **Prettier master** **Input:** ```sh echo "const y = {a:1,b:2}" | prettier --range-start 12 --range-end 14 ``` **Output:**...
When range formatting a ClassDefinition, there is an offset which is the same as `class`. Original issue prettier/prettier-vscode#398 `echo -e "export default class Foo{\n/**/\n}" | prettier --range-start 16 --range-end 31`...
**Environments:** - Prettier Version: 1.14.0 - Running Prettier via: Node API - Runtime: Node 7.9 (vscode) irrelevant - Operating System: All **Steps to reproduce:** `require('prettier').getSupportInfo().languages.find(l=>l.name === "Flow")` **Expected behavior:** It...