-
Notifications
You must be signed in to change notification settings - Fork 214
Update dependency eslint-config-airbnb to v17 #959
Conversation
5780db3
to
28e031e
Compare
PR has been editedAs this PR has been edited, Renovate will stop updating it in order to not cause any conflicts or other problems. If you wish to abandon your edits and have Renovate recreate this PR then you should rename this PR and then close it. |
To match airbnb-config's peer dependency, and since it actually needs features only available on the newer versions. Fixes: ``` node_modules/eslint-config-airbnb/rules/react.js: Configuration for rule "react/jsx-no-target-blank" is invalid: Value [{"enforceDynamicLinks":"always"}] should NOT have more than 0 items. ```
``` packages/create-project/commands/init/index.js 40:12 error Unnecessary 'else' after 'return' no-else-return packages/create-project/commands/init/templates/preact/src/App.jsx 12:13 error `Welcome to ` must be placed on a new line react/jsx-one-expression-per-line 12:24 error `{this.state.name}` must be placed on a new line react/jsx-one-expression-per-line 12:25 error Must use destructuring state assignment react/destructuring-assignment packages/create-project/commands/init/templates/react-components/src/components/HelloWorld/index.jsx 20:12 error Must use destructuring props assignment react/destructuring-assignment 24:26 error Must use destructuring props assignment react/destructuring-assignment 38:29 error Must use destructuring state assignment react/destructuring-assignment 38:66 error `Hello World!` must be placed on a new line react/jsx-one-expression-per-line 39:9 error Missing an explicit type attribute for button react/button-has-type 39:44 error `Change color` must be placed on a new line react/jsx-one-expression-per-line packages/create-project/commands/init/templates/react/src/App.jsx 13:13 error `Welcome to ` must be placed on a new line react/jsx-one-expression-per-line 13:24 error `{this.state.name}` must be placed on a new line react/jsx-one-expression-per-line 13:25 error Must use destructuring state assignment react/destructuring-assignment ``` The `componentWillReceiveProps` usage was removed since its use is now discouraged, and the behaviour of not letting new props override current state seems fine. See: https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops
0c64381
to
1a177fe
Compare
@@ -37,7 +37,8 @@ module.exports = class Project extends Generator { | |||
title: this.options.name | |||
} | |||
}]; | |||
} else if (projectType === 'library') { | |||
} | |||
if (projectType === 'library') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Insert a blank line above this conditional.
return ( | ||
<div class="App"> | ||
<h1>Welcome to {this.state.name}</h1> | ||
<h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this have to be changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this have to be changed?
The eslint errors that were being fixed are listed in the commit message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "expression on a new line" change here looks a little redundant, but I guess there are other cases where it would help. It may be that eslint-config-prettier soon turns this off or something, but we can always adjust it back when/if we use prettier in this repo :-)
* Update dependency eslint-config-airbnb to v17 * Bump minimum eslint-plugin-{import,react} To match airbnb-config's peer dependency, and since it actually needs features only available on the newer versions. Fixes: ``` node_modules/eslint-config-airbnb/rules/react.js: Configuration for rule "react/jsx-no-target-blank" is invalid: Value [{"enforceDynamicLinks":"always"}] should NOT have more than 0 items. ``` * Fix new eslint errors ``` packages/create-project/commands/init/index.js 40:12 error Unnecessary 'else' after 'return' no-else-return packages/create-project/commands/init/templates/preact/src/App.jsx 12:13 error `Welcome to ` must be placed on a new line react/jsx-one-expression-per-line 12:24 error `{this.state.name}` must be placed on a new line react/jsx-one-expression-per-line 12:25 error Must use destructuring state assignment react/destructuring-assignment packages/create-project/commands/init/templates/react-components/src/components/HelloWorld/index.jsx 20:12 error Must use destructuring props assignment react/destructuring-assignment 24:26 error Must use destructuring props assignment react/destructuring-assignment 38:29 error Must use destructuring state assignment react/destructuring-assignment 38:66 error `Hello World!` must be placed on a new line react/jsx-one-expression-per-line 39:9 error Missing an explicit type attribute for button react/button-has-type 39:44 error `Change color` must be placed on a new line react/jsx-one-expression-per-line packages/create-project/commands/init/templates/react/src/App.jsx 13:13 error `Welcome to ` must be placed on a new line react/jsx-one-expression-per-line 13:24 error `{this.state.name}` must be placed on a new line react/jsx-one-expression-per-line 13:25 error Must use destructuring state assignment react/destructuring-assignment ``` The `componentWillReceiveProps` usage was removed since its use is now discouraged, and the behaviour of not letting new props override current state seems fine. See: https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops
This Pull Request updates dependency eslint-config-airbnb from
^16.1.0
to^17.0.0
Release Notes
v17.0.0
Compare Source
This PR has been generated by Renovate Bot.