Skip to content

Make JSX transformer string quoting configurable #445

@pgherveou

Description

@pgherveou

Hello guys
First of all Great project :)

I just tweaked my linter plugin (sublinter) to use react tools and transform jsx code before linting

I just have a small issue though the code generated use double quote strings and thus as we are enforcing single quote string, this produce an error.

Can we enforce single string on the transformer?

/** @jsx React.DOM */
var React = require('react');

module.exports = React.renderComponent(
  <h1>foo</h1>,
  document.getElementById('example')
);

generates React.DOM.h1(null, "foo") instead of desired React.DOM.h1(null, 'foo'),

/** @jsx React.DOM */
var React = require('react');

module.exports = React.renderComponent(
  React.DOM.h1(null, "foo"),
  document.getElementById('example')
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions