mirror of
https://github.com/react-webpack-generators/generator-react-webpack.git
synced 2025-12-08 18:01:59 +00:00
Merge pull request #10 from newtriks/JSXHint-integration
Removed manual wrapping of JSX code to bypass jshint errors and advised ...
This commit is contained in:
commit
defeaedb71
@ -65,7 +65,6 @@ Produces `src/scripts/components/Foo.jsx` (*javascript - JSX*):
|
|||||||
var React = require('react/addons');
|
var React = require('react/addons');
|
||||||
|
|
||||||
var Foo = React.createClass({
|
var Foo = React.createClass({
|
||||||
/*jshint ignore:start */
|
|
||||||
render: function () {
|
render: function () {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@ -73,7 +72,6 @@ var Foo = React.createClass({
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/*jshint ignore:end */
|
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = Foo;
|
module.exports = Foo;
|
||||||
@ -164,6 +162,10 @@ Out the box the [Gruntfile](http://gruntjs.com/api/grunt.file) is configured wit
|
|||||||
|
|
||||||
Included in the project is [Eric Meyer's reset.css](http://meyerweb.com/eric/tools/css/reset/) script. There is also a `src/styles/main.css` script that's required by the core `src/scripts/components/App.js` component using Webpack.
|
Included in the project is [Eric Meyer's reset.css](http://meyerweb.com/eric/tools/css/reset/) script. There is also a `src/styles/main.css` script that's required by the core `src/scripts/components/App.js` component using Webpack.
|
||||||
|
|
||||||
|
### JSHint
|
||||||
|
|
||||||
|
Please use [JSXHint](https://github.com/STRML/JSXHint) for linting JSX and the corresponding Sublime package if using SLT3 [SublimeLinter-jsxhint](https://github.com/SublimeLinter/SublimeLinter-jsxhint). Note this is a global npm install and JSX files will need to be associated with the JSX file type withing SLT3.
|
||||||
|
|
||||||
## Props
|
## Props
|
||||||
|
|
||||||
Thanks to all who contributed to [generator-angular](https://github.com/yeoman/generator-angular) as the majority of code here has been shamelessy sourced from that repos.
|
Thanks to all who contributed to [generator-angular](https://github.com/yeoman/generator-angular) as the majority of code here has been shamelessy sourced from that repos.
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"latedef": true,
|
"latedef": true,
|
||||||
"newcap": true,
|
"newcap": true,
|
||||||
"noarg": true,
|
"noarg": true,
|
||||||
"quotmark": "single",
|
"quotmark": "false",
|
||||||
"regexp": true,
|
"regexp": true,
|
||||||
"undef": true,
|
"undef": true,
|
||||||
"unused": false,
|
"unused": false,
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"latedef": true,
|
"latedef": true,
|
||||||
"newcap": true,
|
"newcap": true,
|
||||||
"noarg": true,
|
"noarg": true,
|
||||||
"quotmark": "single",
|
"quotmark": "false",
|
||||||
"regexp": true,
|
"regexp": true,
|
||||||
"undef": true,
|
"undef": true,
|
||||||
"unused": false,
|
"unused": false,
|
||||||
|
|||||||
@ -14,7 +14,6 @@ require('../../styles/main.css');
|
|||||||
var imageURL = '../../images/yeoman.png';
|
var imageURL = '../../images/yeoman.png';
|
||||||
|
|
||||||
var <%= scriptAppName %> = React.createClass({
|
var <%= scriptAppName %> = React.createClass({
|
||||||
/*jshint ignore:start */
|
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
<div className='main'>
|
<div className='main'>
|
||||||
@ -24,7 +23,6 @@ var <%= scriptAppName %> = React.createClass({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/*jshint ignore:end */
|
|
||||||
});
|
});
|
||||||
|
|
||||||
React.renderComponent(<<%= scriptAppName %> />, document.getElementById('content')); // jshint ignore:line
|
React.renderComponent(<<%= scriptAppName %> />, document.getElementById('content')); // jshint ignore:line
|
||||||
|
|||||||
@ -8,15 +8,13 @@ var React = require('react/addons');
|
|||||||
require('../../styles/<%= classedName %>.css');
|
require('../../styles/<%= classedName %>.css');
|
||||||
|
|
||||||
var <%= classedName %> = React.createClass({
|
var <%= classedName %> = React.createClass({
|
||||||
/*jshint ignore:start */
|
|
||||||
render: function () {
|
render: function () {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<p>Content for <%= classedName %></p>
|
<p>Content for <%= classedName %></p>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
/*jshint ignore:end */
|
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = <%= classedName %>;
|
module.exports = <%= classedName %>;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user