Skip to content

Commit

Permalink
chore: ingoring onchange rule
Browse files Browse the repository at this point in the history
The community seems to prefer to not use this rule anymore:
jsx-eslint/eslint-plugin-jsx-a11y#757
  • Loading branch information
zstix committed Jun 2, 2021
1 parent 92e1ad1 commit f2a22ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Expand Up @@ -26,6 +26,7 @@ module.exports = {
},
ignorePatterns: ['**/__tests__/**/*'],
rules: {
'jsx-a11y/no-onchange': 0,
'no-unused-vars': [
'error',
{
Expand Down
5 changes: 2 additions & 3 deletions src/components/Tabs/Bar.js
Expand Up @@ -9,8 +9,7 @@ const MobileTabControl = ({ children }) => {
const [currentTab, setCurrentTab] = useTabs();

// eslint gets angry about using props from React.Children.map
// eslint also suggests using onBlur vs onChange, but i think we want the immediate change.
/* eslint-disable react/prop-types, jsx-a11y/no-onchange */
/* eslint-disable react/prop-types */
return (
<select
onChange={(e) => setCurrentTab(e.target.value)}
Expand All @@ -36,8 +35,8 @@ const MobileTabControl = ({ children }) => {
</option>
))}
</select>
/* eslint-enable react/prop-types, jsx-a11y/no-onchange */
);
/* eslint-enable react/prop-types */
};

MobileTabControl.propTypes = {
Expand Down

0 comments on commit f2a22ed

Please sign in to comment.