From 09adc22031e545ef818a57fee3e8a88de3afb0f0 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 30 Jan 2024 10:59:23 -0800 Subject: [PATCH 1/5] [eslint config] [patch] `jsx-a11y/no-noninteractive-tabindex`: allow expression values --- packages/eslint-config-airbnb/rules/react-a11y.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/eslint-config-airbnb/rules/react-a11y.js b/packages/eslint-config-airbnb/rules/react-a11y.js index 643cf64407..e83c5512ea 100644 --- a/packages/eslint-config-airbnb/rules/react-a11y.js +++ b/packages/eslint-config-airbnb/rules/react-a11y.js @@ -192,6 +192,7 @@ module.exports = { 'jsx-a11y/no-noninteractive-tabindex': ['error', { tags: [], roles: ['tabpanel'], + allowExpressionValues: true, }], // require onBlur instead of onChange From b23992033ce67ace887044140efb2df70aa1766d Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 30 Jan 2024 10:59:47 -0800 Subject: [PATCH 2/5] [eslint config] [patch] `jsx-a11y/no-redundant-roles`: allow `nav` to have `navigation` role --- packages/eslint-config-airbnb/rules/react-a11y.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-airbnb/rules/react-a11y.js b/packages/eslint-config-airbnb/rules/react-a11y.js index e83c5512ea..58065120a4 100644 --- a/packages/eslint-config-airbnb/rules/react-a11y.js +++ b/packages/eslint-config-airbnb/rules/react-a11y.js @@ -201,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 From 5f019b1b11e69e7ee300ab15d5b0123c9c226bbe Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 25 Mar 2024 09:28:53 -0700 Subject: [PATCH 3/5] [eslint config] [*] [dev deps] update `tape` --- packages/eslint-config-airbnb-base/package.json | 2 +- packages/eslint-config-airbnb/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eslint-config-airbnb-base/package.json b/packages/eslint-config-airbnb-base/package.json index 92daf3c33b..6ae226d583 100644 --- a/packages/eslint-config-airbnb-base/package.json +++ b/packages/eslint-config-airbnb-base/package.json @@ -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", diff --git a/packages/eslint-config-airbnb/package.json b/packages/eslint-config-airbnb/package.json index 69a4670f8e..622e30682f 100644 --- a/packages/eslint-config-airbnb/package.json +++ b/packages/eslint-config-airbnb/package.json @@ -82,7 +82,7 @@ "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", From 932951adc2d503d906c85b01179b4e1256c41896 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 25 Mar 2024 09:31:09 -0700 Subject: [PATCH 4/5] [eslint config] [deps] update `eslint-plugin-react` --- packages/eslint-config-airbnb/package.json | 4 ++-- packages/eslint-config-airbnb/rules/react.js | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/eslint-config-airbnb/package.json b/packages/eslint-config-airbnb/package.json index 622e30682f..2b18a55f64 100644 --- a/packages/eslint-config-airbnb/package.json +++ b/packages/eslint-config-airbnb/package.json @@ -77,7 +77,7 @@ "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", @@ -88,7 +88,7 @@ "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": { diff --git a/packages/eslint-config-airbnb/rules/react.js b/packages/eslint-config-airbnb/rules/react.js index ac4e4e29d3..b5ccc6ccf2 100644 --- a/packages/eslint-config-airbnb/rules/react.js +++ b/packages/eslint-config-airbnb/rules/react.js @@ -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 }], From f20eca9f646954f2ebb0375e3a99b85e7b7161ad Mon Sep 17 00:00:00 2001 From: Riaz Date: Mon, 25 Mar 2024 13:00:44 +0400 Subject: [PATCH 5/5] [guide] fix compat table URL https://kangax.github.io/compat-table/es6/ hit a 404 error, URL: https://compat-table.github.io/compat-table/es6/ --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9681aa4b51..120057b062 100644 --- a/README.md +++ b/README.md @@ -3406,7 +3406,7 @@ Other Style Guides this.firstName = 'Panda'; // good, in environments where WeakMaps are available - // see https://kangax.github.io/compat-table/es6/#test-WeakMap + // see https://compat-table.github.io/compat-table/es6/#test-WeakMap const firstNames = new WeakMap(); firstNames.set(this, 'Panda'); ``` @@ -3860,7 +3860,7 @@ Other Style Guides - [Latest ECMA spec](https://tc39.github.io/ecma262/) - [ExploringJS](https://exploringjs.com/) - - [ES6 Compatibility Table](https://kangax.github.io/compat-table/es6/) + - [ES6 Compatibility Table](https://compat-table.github.io/compat-table/es6/) - [Comprehensive Overview of ES6 Features](http://es6-features.org/) - [JavaScript Roadmap](https://roadmap.sh/javascript)