jsx-autocorrect

1.0.0 • Public • Published

jsx-autocorrect

A babel plugin that enables you to use class, for, and enable-background as jsx attributes. Go nuts!

Example

<input class="camouflage" name="cuttlefish" ... />
<label for="cuttlefish">
    <svg viewBox="0 0 25 25" enable-background="new 0 0 25 25">
        ...

Transpiled:

<input className="camouflage" name="cuttlefish" ... />
<label htmlFor="cuttlefish">
    <svg viewBox="0 0 25 25" enableBackground="new 0 0 25 25">
        ...

Install

npm install --save-dev jsx-autocorrect

with .babelrc:

{
  "presets": ["es2015", "react"],
  "plugins": ["jsx-autocorrect"]
}

with webpack

module.exports = { 
  module: {
    loaders: [
      {
        test: /\.jsx$/,
        loader: 'babel',
        query: {
          plugins: ['jsx-autocorrect'],
        },
      },
    ],
  },
  ...
}

Feel free to suggest any additions!

Readme

Keywords

Package Sidebar

Install

npm i jsx-autocorrect

Weekly Downloads

1

Version

1.0.0

License

ISC

Last publish

Collaborators

  • pavasich