Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Update dependency eslint-config-airbnb to v17 #959

Merged
merged 4 commits into from
Jun 25, 2018

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 22, 2018

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.

@renovate renovate bot force-pushed the renovate/eslint-config-airbnb-17.x branch from 5780db3 to 28e031e Compare June 23, 2018 00:46
@renovate
Copy link
Contributor Author

renovate bot commented Jun 23, 2018

PR has been edited

As 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.

@edmorley edmorley added this to the v9 milestone Jun 23, 2018
@edmorley edmorley requested a review from eliperelman June 23, 2018 11:27
renovate-bot and others added 3 commits June 25, 2018 12:52
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
@edmorley edmorley force-pushed the renovate/eslint-config-airbnb-17.x branch from 0c64381 to 1a177fe Compare June 25, 2018 11:55
@@ -37,7 +37,8 @@ module.exports = class Project extends Generator {
title: this.options.name
}
}];
} else if (projectType === 'library') {
}
if (projectType === 'library') {
Copy link
Member

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>
Copy link
Member

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?

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

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

Interesting.

Copy link
Member

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 :-)

@edmorley edmorley self-assigned this Jun 25, 2018
@edmorley edmorley merged commit 1855c0a into master Jun 25, 2018
@edmorley edmorley deleted the renovate/eslint-config-airbnb-17.x branch June 25, 2018 14:45
acconrad pushed a commit to acconrad/neutrino-dev that referenced this pull request Jul 13, 2018
* 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

3 participants