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)

Most upvoted comments

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.

  1. Insert snippet
  2. Save document with prettier installed or format code via the command palette 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 ๐Ÿ˜ƒ