atom-react
atom-react copied to clipboard
Only auto-close when in syntactically correct position
This is a hard one I know, but I am just reporting it because I believe WebStorm does handle this correctly.
Similar to #60, atom-react incorrectly auto-closes type parameters like const foo: Array<number></number>.
There is an option to disable the auto-closing, but theoretically it's possible (though not easy I'm sure) to detect if the cursor is in a position for a type parameter annotation or a JSX tag. Maybe sometime I'll investigate if it's possible to do a partial run of babel or another parser up to the cursor and then inspect the parser state to determine where the cursor is in the syntax tree (so that we can tell where the user is typing even if the file is not currently valid)...