Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable eslint rules for click-events-have-key-events #2204

Closed
wants to merge 1 commit into from

Conversation

ndelangen
Copy link
Member

Issue: https://www.codefactor.io/repository/github/storybooks/storybook/file/master/addons/info/src/components/Story.js

What I did

configure eslint to allow onClick handles without a keyboard handler.

@codecov
Copy link

codecov bot commented Nov 1, 2017

Codecov Report

Merging #2204 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2204   +/-   ##
=======================================
  Coverage   21.42%   21.42%           
=======================================
  Files         263      263           
  Lines        5807     5807           
  Branches      696      693    -3     
=======================================
  Hits         1244     1244           
+ Misses       4026     4019    -7     
- Partials      537      544    +7
Impacted Files Coverage Δ
lib/ui/src/modules/api/configs/init_api.js 40.47% <0%> (ø) ⬆️
app/react/src/client/preview/error_display.js 0% <0%> (ø) ⬆️
...res__/update-addon-info/update-addon-info.input.js 0% <0%> (ø) ⬆️
addons/storyshots/src/storybook-channel-mock.js 0% <0%> (ø) ⬆️
...react-native/src/manager/components/PreviewHelp.js 0% <0%> (ø) ⬆️
...rc/modules/ui/components/left_panel/text_filter.js 30.98% <0%> (ø) ⬆️
addons/knobs/src/components/PropForm.js 9.09% <0%> (ø) ⬆️
addons/knobs/src/components/types/Number.js 8.06% <0%> (ø) ⬆️
lib/ui/src/libs/key_events.js 23.25% <0%> (ø) ⬆️
lib/components/src/navigation/menu_link.js 0% <0%> (ø) ⬆️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02b04cc...58d8a9a. Read the comment docs.

@ndelangen
Copy link
Member Author

I'm trying to take the number of issues on CodeFactor down a bit, This PR is related to a support ticket, please do not merge just yet.

@ndelangen ndelangen self-assigned this Nov 1, 2017
@Hypnosphi
Copy link
Member

Hypnosphi commented Nov 1, 2017

Should we rather add the listeners maybe? We could introduce a helper component in @storybook/components

@ndelangen
Copy link
Member Author

Doesn't react call onClick when a users focusses an element and presses ENTER? Browsers do...

I just don't understand why this rule exists in the first place.

@Hypnosphi
Copy link
Member

Hypnosphi commented Nov 1, 2017

Doesn't react call onClick when a users focusses an element and presses ENTER?

That's the default browser behaviour for buttons but not for anything else

@Hypnosphi
Copy link
Member

I switched this rule to warning level in #2212 so that we can fix it later

@ndelangen ndelangen closed this Nov 2, 2017
@ndelangen ndelangen deleted the ndelangen/eslint-fix branch November 2, 2017 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants