jscs rules for jsx content
npm install jscs-jsx-rulesCurrently, this plugin provides a single rule to help enforce spacing inside of JSX expression containers.
To enable this plugin, your JSCS configuration would need to include:
``json`
{
"plugins": [ "jscs-jsx-rules" ]
}
Disallows spaces after the opening curly brace and before the closing curly brace of a JSX expression container.
Type: Boolean
Value: true
Example
`json`
"disallowSpacesInsideJsxExpressionContainers": true
Valid
`js`
function render() {
return {this.props.name};
}
Invalid
`js`
function render() {
return { this.props.name };
}
Requires that there are spaces after the opening curly brace and before the closing curly brace of a JSX expression container.
Type: Boolean
Value: true
Example
`json`
"requireSpacesInsideJsxExpressionContainers": true
Valid
`js`
function render() {
return { this.props.name };
}
Invalid
`js``
function render() {
return {this.props.name};
}
MIT (