eslint-plugin-react icon indicating copy to clipboard operation
eslint-plugin-react copied to clipboard

[New] `sort-prop-types`: support comments on prop types

Open alexzherdev opened this issue 6 years ago • 13 comments

Resolves #1940

alexzherdev avatar Sep 05 '18 01:09 alexzherdev

This could use a rebase.

ljharb avatar Dec 27 '18 21:12 ljharb

Will look into that today 👍

alexzherdev avatar Dec 27 '18 21:12 alexzherdev

Hmm appveyor actually failed (node 5 choked on args spread somewhere inside eslint), but there's a green check here.

alexzherdev avatar Dec 28 '18 04:12 alexzherdev

@alexzherdev node 5 is an allowed failure; eslint 5 also requires node 6+ now, so it's fine.

ljharb avatar Dec 28 '18 05:12 ljharb

Is there something missing for this PR to get merged? I also encountered the problem described in the referenced issue.

amannn avatar Jan 30 '19 11:01 amannn

@amannn I will be tackling https://github.com/yannickcr/eslint-plugin-react/pull/1973#discussion_r247757333 within a few days

alexzherdev avatar Jan 30 '19 16:01 alexzherdev

@alexzherdev That's great to hear! Thank you so much for your help!

It's really cool to have auto fixable jsx-sort-props and sort-prop-types. After that, there's only auto fixing for jsx-sort-default-props missing for me to go all-in on sorting props 🙂.

amannn avatar Jan 30 '19 16:01 amannn

Any resolution on this PR yet? Would be super useful for users of storybook

DNR500 avatar Jun 20 '19 15:06 DNR500

Haven’t had time to get back to it yet. The issue in https://github.com/yannickcr/eslint-plugin-react/pull/1973#discussion_r215113449 is a tricky one to make sense of.

alexzherdev avatar Jun 20 '19 16:06 alexzherdev

@alexzherdev Not sure if that's an option, but since even the test suite on master fails for that version, would it be an option to bump the peer dependency of eslint to 3.18.0?

Would be a shame if the support for that version would block helpful contributions like this PR. ESLint 3.0.0 was released on July 1, 2016 – that's three years ago. Even node.js LTS releases have a stop of maintenance after 3 years.

amannn avatar Jun 21 '19 06:06 amannn

@amannn no, that'd be a breaking change.

Surely there's a way we can handle eslint 3.0 - even if that means gracefully degrading to the behavior prior to this PR.

ljharb avatar Jun 21 '19 06:06 ljharb

@alexzherdev I'm going to disable the entire autofix behavior of this rule before the next release unless we can find a way to get this PR in; it'd be great if you had time to update this.

ljharb avatar Nov 23 '19 00:11 ljharb

ping @alexzherdev, any update?

ljharb avatar May 09 '20 22:05 ljharb

Closing in favor of #3471.

ljharb avatar Nov 28 '22 20:11 ljharb