Skip to content

hatedMe/rc-beautify

Repository files navigation

Beautify React Javascript TypeScript

A plugin for beautifying react.js in vscode

rc-beautify

This extension wraps prettydiff to format your javascript, JSX, typescript, TSX file.

How To Use?

  • shortcuts: Ctrl+B
  • Press F1, enter Beautify React Javascript TypeScript

Manifest

It works for my main use case and I hope it works for you too.

So this plugin will turn this:

import React, {
    Component
} from 'react';
import PropTypes from 'prop-types';
import {
    connect
} from 'react-redux';

class App extends Component {
render() {
return (
<div>
<h1>hello word</h1>
</div>
)
}
}


export default connect()(App)

into:

import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';

class App extends Component {
    render() {
        return (
            <div>
                <h1>hello word</h1>
            </div>
        )
    }
}

function name() {
    console.log(456);
}

export default connect()(App)

Setting

changge a global settings:

This plugin basically helps you to configure the settings, but you want to change more interesting settings, and the author will slowly update it (though I'm not lazy, hehe =。= )

{
    "insize": 4,
    "inchar": " ",
    "bracepadding": false,
    "wrap": 80
}

Releases

No releases published

Packages

No packages published