Skip to content

Commit

Permalink
Merge 5d253ff into 707edd7
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdcrawford committed Jun 25, 2015
2 parents 707edd7 + 5d253ff commit 0ca779c
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 3 deletions.
19 changes: 18 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@
"brace-style": [2, "1tbs"],
"indent": [2, 2],
"linebreak-style": [2, "unix"],
"semi": [2, "always"]
"semi": [2, "always"],

// eslint-plugin-react
// React specific linting rules for ESLint
"react/display-name": 0, // Prevent missing displayName in a React component
"react/jsx-quotes": [2, "double", "avoid-escape"], // Enforce quote style for JSX attributes
"react/jsx-no-undef": 2, // Disallow undeclared variables in JSX
"react/jsx-sort-props": 0, // Enforce props alphabetical sorting
"react/jsx-uses-react": 2, // Prevent React to be incorrectly marked as unused
"react/jsx-uses-vars": 2, // Prevent variables used in JSX to be incorrectly marked as unused
"react/no-did-mount-set-state": 2, // Prevent usage of setState in componentDidMount
"react/no-did-update-set-state": 2, // Prevent usage of setState in componentDidUpdate
"react/no-multi-comp": 0, // Prevent multiple component definition per file
"react/no-unknown-property": 2, // Prevent usage of unknown DOM property
"react/prop-types": 2, // Prevent missing props validation in a React component definition
"react/react-in-jsx-scope": 2, // Prevent missing React when using JSX
"react/self-closing-comp": 2, // Prevent extra closing tags for components without children
"react/wrap-multilines": 2, // Prevent missing parentheses around multilines JSX
}
}
3 changes: 2 additions & 1 deletion src/components/button/__tests__/button-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @jsx React.DOM */

var React = require('react');
var ButtonView = require('../code/views/buttonView.jsx');

describe('ButtonComponent', function() {
Expand Down Expand Up @@ -67,7 +68,7 @@ describe('ButtonComponent', function() {

it('should render as an anchor if href is present', function() {
var anchor = TestUtils.renderIntoDocument(
<ButtonView href='http://www.ui-toolkit.com'>Go to Toolkit</ButtonView>
<ButtonView href="http://www.ui-toolkit.com">Go to Toolkit</ButtonView>
);

var renderedButton = TestUtils.findRenderedDOMComponentWithTag(anchor, 'a');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var React = require('react');
var classNames = require('classnames');
var getComponentClasses = require('../../../../utils/getComponentClasses');

Expand Down
1 change: 1 addition & 0 deletions src/components/button/code/templates/buttonTemplate.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var React = require('react');
var classNames = require('classnames');
var getComponentClasses = require('../../../../utils/getComponentClasses');

Expand Down
1 change: 1 addition & 0 deletions src/components/flag/__tests__/flag-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @jsx React.DOM */

var React = require('react');
var FlagComponent = require('../code/views/flagView.jsx');

describe('FlagComponent', function() {
Expand Down
1 change: 1 addition & 0 deletions src/components/flag/code/templates/flagTemplate.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var React = require('react');
var classNames = require('classnames');
var getComponentClasses = require('../../../../utils/getComponentClasses');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var React = require('react');

module.exports = function(props) {
return (
<li className="component-icon-list-item">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @jsx React.DOM */

var React = require('react');
var IconList = require('../code/views/IconListComponentView.jsx');
var IconListItem = require('../../icon-list-item/code/views/IconListItemComponentView.jsx');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var React = require('react');

module.exports = function(props) {
return (
<ul className="component-icon-list">
Expand Down
1 change: 1 addition & 0 deletions src/components/image/__tests__/image-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @jsx React.DOM */

var React = require('react');
var ImageComponent = require('../code/views/imageView.jsx');

describe('ImageComponent', function() {
Expand Down
2 changes: 2 additions & 0 deletions src/components/image/code/templates/imageTemplate.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var React = require('react');

module.exports = function(props) {
return (
<img alt={props.alt} src={props.src} className="component-image" />
Expand Down
1 change: 1 addition & 0 deletions src/components/rating/__tests__/rating-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @jsx React.DOM */

var React = require('react');
var RatingComponent = require('../code/views/ratingView.jsx');

describe('RatingComponent', function() {
Expand Down
2 changes: 2 additions & 0 deletions src/components/rating/code/templates/ratingTemplate.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var React = require('react');

module.exports = function(props) {

var $rating = [];
Expand Down
1 change: 1 addition & 0 deletions src/components/reviews/__tests__/reviews-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @jsx React.DOM */

var React = require('react');
var ReviewsComponent = require('../code/views/reviewsView.jsx');

describe('ReviewsComponent', function() {
Expand Down
2 changes: 2 additions & 0 deletions src/components/reviews/code/templates/reviewsTemplate.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var React = require('react');

module.exports = function(props) {
return (
<div itemProp="aggregateRating" itemScope itemType="http://schema.org/AggregateRating" className="ui-component-reviews">
Expand Down
3 changes: 2 additions & 1 deletion src/components/tile/__tests__/tile-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @jsx React.DOM */

var React = require('react');
var TileComponent = require('../code/views/tileView.jsx');

describe('TileComponent', function() {
Expand All @@ -10,7 +11,7 @@ describe('TileComponent', function() {
alt: 'bar'
};

assert.ok(TestUtils.isElement(<TileComponent image={img} title='title' />));
assert.ok(TestUtils.isElement(<TileComponent image={img} title="title" />));
});

});
1 change: 1 addition & 0 deletions src/components/tile/code/templates/tileTemplate.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var React = require('react');
var ImageComponent = require('../../../image');

module.exports = function(props) {
Expand Down

0 comments on commit 0ca779c

Please sign in to comment.