Skip to content

Commit f2a22ed

Browse files
committed
chore: ingoring onchange rule
The community seems to prefer to not use this rule anymore: jsx-eslint/eslint-plugin-jsx-a11y#757
1 parent 92e1ad1 commit f2a22ed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module.exports = {
2626
},
2727
ignorePatterns: ['**/__tests__/**/*'],
2828
rules: {
29+
'jsx-a11y/no-onchange': 0,
2930
'no-unused-vars': [
3031
'error',
3132
{

src/components/Tabs/Bar.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ const MobileTabControl = ({ children }) => {
99
const [currentTab, setCurrentTab] = useTabs();
1010

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

4342
MobileTabControl.propTypes = {

0 commit comments

Comments
 (0)