Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"extends": "rackt",
"extends": ["rackt", "plugin:react/recommended"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to cut this over to Airbnb + overrides, but this is a smaller step.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been using this config lately:

{
  "parser": "babel-eslint",
  "env": {
    "browser": true,
    "node": true
  },
  "plugins": [
    "import",
    "react"
  ],
  "extends": [
    "eslint:recommended",
    "plugin:import/errors",
    "plugin:react/recommended"
  ],
  "rules": {
    "prefer-arrow-callback": 2,
    "semi": [ 2, "never" ]
  }
}

Regardless, we should probably remove the rackt extension, since that repo doesn't exist anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually took me a bit to find it; looks like @pwmckenna adopted it at https://github.com/pwmckenna/eslint-config-rackt.

I like Airbnb because it's a bit more restrictive and has gone through the effort of setting all the rules I never think about, but if it's more than a half dozen or so overrides, it might be better to go with the above.

We'll see – I want to tackle really updating the ESLint config in a separate PR though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's fair. It's a separate thing.

"globals": {
"__DEV__": true
},
"rules": {
"react/jsx-uses-react": 1,
"react/jsx-no-undef": 2,
"react/display-name": 0,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are in the recommended config

"react/wrap-multilines": 2
},
"plugins": [
Expand Down
5 changes: 5 additions & 0 deletions examples/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"react/prop-types": 0
}
}
6 changes: 0 additions & 6 deletions examples/master-detail/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ const App = React.createClass({
},

updateContacts() {
if (!this.isMounted())
return

this.setState({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these isMounted checks were no-ops. The example tears down the subscribers on unmount.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or anyway I don't get state warnings when I run through the example.

contacts: ContactStore.getContacts(),
loading: false
Expand Down Expand Up @@ -91,9 +88,6 @@ const Contact = withRouter(
},

updateContact() {
if (!this.isMounted())
return

this.setState(this.getStateFromStore())
},

Expand Down
4 changes: 2 additions & 2 deletions examples/pinterest/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ const Deep = React.createClass({
<p>Params stick around: {this.props.params.one} {this.props.params.two}</p>
<p>
<Link to={{
pathname: `/pictures/0`,
pathname: '/pictures/0',
state: { modal: true, returnTo: this.props.location.pathname }
}}>
Link to picture with Modal
</Link><br/>
<Link to={`/pictures/0`}>
<Link to="/pictures/0">
Without modal
</Link>
</p>
Expand Down
4 changes: 4 additions & 0 deletions modules/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ const Router = React.createClass({
onError: func,
onUpdate: func,

// Deprecated:
parseQueryString: func,
stringifyQuery: func,

// PRIVATE: For client-side rehydration of server match.
matchContext: object
},
Expand Down
56 changes: 28 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,59 +32,59 @@
],
"license": "MIT",
"dependencies": {
"history": "^2.0.1",
"hoist-non-react-statics": "^1.0.5",
"history": "^2.1.2",
"hoist-non-react-statics": "^1.2.0",
"invariant": "^2.2.1",
"warning": "^2.1.0",
"warning": "^3.0.0",
"loose-envify": "^1.2.0"
},
"peerDependencies": {
"react": "^0.14.0 || ^15.0.0"
},
"devDependencies": {
"babel-cli": "^6.7.5",
"babel-core": "^6.7.6",
"babel-eslint": "^5.0.4",
"babel-cli": "^6.10.1",
"babel-core": "^6.10.4",
"babel-eslint": "^6.1.0",
"babel-loader": "^6.2.4",
"babel-plugin-add-module-exports": "^0.1.2",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-dev-expression": "^0.2.1",
"babel-preset-es2015": "^6.6.0",
"babel-preset-es2015": "^6.9.0",
"babel-preset-es2015-loose": "^7.0.0",
"babel-preset-es2015-loose-native-modules": "^1.0.0",
"babel-preset-react": "^6.5.0",
"babel-preset-react": "^6.11.1",
"babel-preset-stage-1": "^6.5.0",
"babel-register": "^6.7.2",
"babel-register": "^6.9.0",
"bundle-loader": "^0.5.4",
"codecov.io": "^0.1.6",
"coveralls": "^2.11.9",
"cross-env": "^1.0.7",
"cross-env": "^1.0.8",
"css-loader": "^0.23.1",
"eslint": "^1.10.3",
"eslint": "^3.0.0",
"eslint-config-rackt": "^1.1.1",
"eslint-plugin-react": "^3.16.1",
"expect": "^1.18.0",
"express": "^4.13.4",
"eslint-plugin-react": "^5.2.2",
"expect": "^1.20.2",
"express": "^4.14.0",
"express-urlrewrite": "^1.2.0",
"gzip-size": "^3.0.0",
"isparta-loader": "^2.0.0",
"karma": "^0.13.22",
"karma-browserstack-launcher": "^0.1.10",
"karma-chrome-launcher": "^0.2.3",
"karma-coverage": "^0.5.5",
"karma-mocha": "^0.2.2",
"karma-mocha-reporter": "^2.0.1",
"karma": "^1.1.0",
"karma-browserstack-launcher": "^1.0.1",
"karma-chrome-launcher": "^1.0.1",
"karma-coverage": "^1.0.0",
"karma-mocha": "^1.1.1",
"karma-mocha-reporter": "^2.0.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.7.0",
"mocha": "^2.4.5",
"mocha": "^2.5.3",
"pretty-bytes": "^3.0.1",
"qs": "^6.1.0",
"react": "^15.0.0",
"react-addons-css-transition-group": "^15.0.0",
"react-addons-test-utils": "^15.0.0",
"react-dom": "^15.0.0",
"qs": "^6.2.0",
"react": "^15.2.0",
"react-addons-css-transition-group": "^15.2.0",
"react-addons-test-utils": "^15.2.0",
"react-dom": "^15.2.0",
"rimraf": "^2.5.2",
"style-loader": "^0.13.1",
"webpack": "^1.12.14",
"webpack": "^1.13.1",
"webpack-dev-middleware": "^1.6.1"
},
"browserify": {
Expand Down