Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Remove deprecated rule #16

Merged
merged 1 commit into from
Apr 25, 2018
Merged

Remove deprecated rule #16

merged 1 commit into from
Apr 25, 2018

Conversation

mitogh
Copy link
Contributor

@mitogh mitogh commented Apr 17, 2018

Use the new rule:

  • 'react/jsx-tag-spacing' in favor of 'react/jsx-space-before-closing'.

The rule is deprecated:

And to avoid having notices of deprecation during the lint update with the new one.

Use the new rule: 

- `'react/jsx-tag-spacing'` in favor of `'react/jsx-space-before-closing'`
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Thanks for the change request.

Looking through the new options, I think we'd want to configure beforeClosing: 'never', given examples of "good" component render examples in the Calypso guidelines:

https://github.com/Automattic/wp-calypso/blob/master/docs/coding-guidelines/javascript.md#react-components

@mitogh
Copy link
Contributor Author

mitogh commented Apr 22, 2018

Hey thanks for the follow up here @aduth, however I'm not really sure what the right call is as I don't think is very explicit on the guidelines.

However the previous (or current) rule uses always as parameter as that one is the default value for that property react/jsx-space-before-closing. So I think for consistency reasons always should be used for react/jsx-tag-spacing.

Let me know what you think.

Thanks.

@aduth
Copy link
Contributor

aduth commented Apr 25, 2018

Hey @mitogh , I think I misread the rule description the first time around. 'always' sounds like the correct option value.

@mitogh
Copy link
Contributor Author

mitogh commented Apr 25, 2018

Thanks @aduth

That's the default value:

The default value of this option is "always".

On: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md#rule-details

Do you think we need to specify explicitly anyways?

Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Nope, apologies for the confusion. This looks great as-is. Thanks!

@aduth aduth merged commit eadae3a into Automattic:master Apr 25, 2018
@mitogh mitogh deleted the patch-1 branch April 25, 2018 20:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants