Skip to content

Commit

Permalink
Merge branch 'master' into update-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bstashchuk committed Apr 2, 2024
2 parents 352c3db + f20eca9 commit bed075e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3451,7 +3451,7 @@ Other Style Guides
this.firstName = 'Panda';

// good, in environments where WeakMaps are available
// see https://compat-table.github.io/compat-table/es6/ -> Built-ins -> WeakMap
// see https://compat-table.github.io/compat-table/es6/#test-WeakMap
const firstNames = new WeakMap();
firstNames.set(this, 'Panda');
```
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-airbnb-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"eslint-plugin-import": "^2.29.1",
"in-publish": "^2.0.1",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.4"
"tape": "^5.7.5"
},
"peerDependencies": {
"eslint": "^7.32.0 || ^8.2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-config-airbnb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@
"eslint-find-rules": "^4.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"in-publish": "^2.0.1",
"react": ">= 0.13.0",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.4"
"tape": "^5.7.5"
},
"peerDependencies": {
"eslint": "^7.32.0 || ^8.2.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0"
},
"engines": {
Expand Down
5 changes: 4 additions & 1 deletion packages/eslint-config-airbnb/rules/react-a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ module.exports = {
'jsx-a11y/no-noninteractive-tabindex': ['error', {
tags: [],
roles: ['tabpanel'],
allowExpressionValues: true,
}],

// require onBlur instead of onChange
Expand All @@ -200,7 +201,9 @@ module.exports = {

// ensure HTML elements do not specify redundant ARIA roles
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md
'jsx-a11y/no-redundant-roles': 'error',
'jsx-a11y/no-redundant-roles': ['error', {
nav: ['navigation'],
}],

// Enforce that DOM elements without semantic behavior not have interaction handlers
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
Expand Down
7 changes: 7 additions & 0 deletions packages/eslint-config-airbnb/rules/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ module.exports = {
],
}],

// This rule enforces onChange or readonly attribute for checked property of input elements.
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md
'react/checked-requires-onchange-or-readonly': ['off', {
ignoreMissingProperties: false,
ignoreExclusiveCheckedAttribute: false
}],

// Prevent missing displayName in a React component definition
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md
'react/display-name': ['off', { ignoreTranspilerName: false }],
Expand Down

0 comments on commit bed075e

Please sign in to comment.