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 jsx-a11y/no-onchange lint rule #50023

Merged
merged 2 commits into from Feb 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc.js
Expand Up @@ -263,6 +263,10 @@ module.exports = {
// i18n-calypso translate triggers false failures
'jsx-a11y/anchor-has-content': 'off',

// Deprecated rule, the problems using <select> with keyboards this addressed don't appear to be an issue anymore
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/398
'jsx-a11y/no-onchange': 'off',

'no-restricted-imports': [
2,
{
Expand Down
2 changes: 0 additions & 2 deletions client/blocks/site-address-changer/index.jsx
@@ -1,5 +1,3 @@
/* eslint-disable jsx-a11y/no-onchange */

/**
* External dependencies
*/
Expand Down
2 changes: 0 additions & 2 deletions client/components/forms/form-country-select/index.jsx
Expand Up @@ -17,7 +17,6 @@ import FormSelect from 'calypso/components/forms/form-select';
*/
import './style.scss';

/* eslint-disable jsx-a11y/no-onchange */
export class FormCountrySelect extends Component {
static propTypes = {
countriesList: PropTypes.array.isRequired,
Expand Down Expand Up @@ -74,6 +73,5 @@ export class FormCountrySelect extends Component {
);
}
}
/* eslint-enable jsx-a11y/no-onchange */

export default localize( FormCountrySelect );
Expand Up @@ -204,7 +204,6 @@ function EbanxTefFields() {
function BankSelector( { id, value, onChange, label, isError, errorMessage, disabled } ) {
const { __ } = useI18n();
const bankOptions = getBankOptions( __ );
/* eslint-disable jsx-a11y/no-onchange */
return (
<SelectWrapper>
<label htmlFor={ id } disabled={ disabled }>
Expand All @@ -223,7 +222,6 @@ function BankSelector( { id, value, onChange, label, isError, errorMessage, disa
<ErrorMessage isError={ isError } errorMessage={ errorMessage } />
</SelectWrapper>
);
/* eslint-enable jsx-a11y/no-onchange */
}

function BankOption( { value, label } ) {
Expand Down
2 changes: 0 additions & 2 deletions client/my-sites/google-my-business/stats/chart.js
Expand Up @@ -97,7 +97,6 @@ function getAggregation( props ) {
}

/* eslint-disable wpcalypso/jsx-classname-namespace */
/* eslint-disable jsx-a11y/no-onchange */

class GoogleMyBusinessStatsChart extends Component {
static propTypes = {
Expand Down Expand Up @@ -311,7 +310,6 @@ class GoogleMyBusinessStatsChart extends Component {
}
}
/* eslint-enable wpcalypso/jsx-classname-namespace */
/* eslint-enable jsx-a11y/no-onchange */

export default connect(
( state, ownProps ) => {
Expand Down
2 changes: 0 additions & 2 deletions client/my-sites/marketing/connections/mailchimp-settings.jsx
Expand Up @@ -92,7 +92,6 @@ const MailchimpSettings = ( {
);
}

/* eslint-disable jsx-a11y/no-onchange */
return (
<div>
<QueryMailchimpLists siteId={ siteId } />
Expand Down Expand Up @@ -132,7 +131,6 @@ const MailchimpSettings = ( {
{ common }
</div>
);
/* eslint-enable jsx-a11y/no-onchange */
};

export const renderMailchimpLogo = () => (
Expand Down
Expand Up @@ -118,7 +118,6 @@ function IdealFields() {
function BankSelector( { id, value, onChange, label, isError, errorMessage, disabled } ) {
const { __ } = useI18n();
const bankOptions = getBankOptions( __ );
/* eslint-disable jsx-a11y/no-onchange */
return (
<SelectWrapper>
<label htmlFor={ id } disabled={ disabled }>
Expand All @@ -137,7 +136,6 @@ function BankSelector( { id, value, onChange, label, isError, errorMessage, disa
<ErrorMessage isError={ isError } errorMessage={ errorMessage } />
</SelectWrapper>
);
/* eslint-enable jsx-a11y/no-onchange */
}

function BankOption( { value, label } ) {
Expand Down