vscode-react-javascript-snippets: Semi & singleQuotes configuration - [Not available for now]
Hi @dsznajder, thanks for making this nice plugin. Is there an existing way to use double quotes instead of single quotes and to add semicolons?
Example ->
import React, { PureComponent } from "react";
import PropTypes from "prop-types";
export default class TaskInformation extends PureComponent {
static propTypes = {
}
render() {
return (
<div>
</div>
);
}
}
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 15
- Comments: 16 (1 by maintainers)
It would be good if you add this as an option. If it turned on it will add semicolon, vice versa.
Iโm not sure if you need this feature inside the library for another reason but there is always the possibility to have
prettier
autoformat your code based on your project preferences.CTRL|CMD+Shift+P => Format Document
I found this plugin has options to decide whether to use semicolons or not. The plugin works for now but it seems that itโs no longer being manitained by its owner. Maybe someone would check this. React Redux ES6 Snippets
@dsznajder Awesome ๐ Iโll have a look at it when I have a chance as well ๐
I thought about same thing. Iโm not sure about performance downsize of that. Also, change of this any of those, should regenerate .json file everytime, not sure if possible to dynamically load new file. I will yeet over the weekend.
P.S. Iโm not familiar with extension development neither ;p just reading docs and trying.
For semi-colons, it is possible by editing snippets.json (for Windows 10, it is found in
C:\Users\roger\.vscode\extensions\dsznajder.es7-react-js-snippets-2.4.0\snippets
). Downside is that not all users prefer semi-colons and when changes are pushed to this repo, it will restore snippets.json back to its original, removing all your inserted semi-colons.There is no possibility for now, but feel free to add this option ๐