diff --git a/CHANGELOG.md b/CHANGELOG.md index 38f2d16..44c5aa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## Unreleased +## [0.3.1](https://github.com/torchbox/eslint-config-torchbox/compare/v0.3.0...v0.3.1) (2019-10-09) + +### Bug fixes + +- Add missing `airbnb/hooks` extend for the React [Rules of hooks](https://reactjs.org/docs/hooks-rules.html) ([#3](https://github.com/torchbox/eslint-config-torchbox/issues/3), [#10](https://github.com/torchbox/eslint-config-torchbox/pull/10)). + ## [0.3.0](https://github.com/torchbox/eslint-config-torchbox/compare/v0.2.0...v0.3.0) (2019-10-08) ### Features diff --git a/README.md b/README.md index 9c9a632..3b6a641 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,8 @@ module.exports = { ### Inherited rules +- [react-hooks/rules-of-hooks](https://github.com/jfmengels/eslint-rule-documentation/blob/master/contributing.md) +- [react-hooks/exhaustive-deps](https://github.com/jfmengels/eslint-rule-documentation/blob/master/contributing.md) - [jsx-a11y/anchor-has-content](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md): `error, components:` - [jsx-a11y/aria-role](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md): `error, ignoreNonDom: false, ignoreNonDOM: false` - [jsx-a11y/aria-props](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md) diff --git a/config.js b/config.js index 7271b9d..206483b 100644 --- a/config.js +++ b/config.js @@ -1,7 +1,7 @@ 'use strict'; module.exports = { - extends: ['airbnb', 'prettier', 'prettier/react'], + extends: ['airbnb', 'airbnb/hooks', 'prettier', 'prettier/react'], env: { browser: true, commonjs: true, diff --git a/src/__snapshots__/semver.test.js.snap b/src/__snapshots__/semver.test.js.snap index 42487e8..1b55300 100644 --- a/src/__snapshots__/semver.test.js.snap +++ b/src/__snapshots__/semver.test.js.snap @@ -25,6 +25,7 @@ Object { "import", "react", "jsx-a11y", + "react-hooks", ], "reportUnusedDisableDirectives": undefined, "rules": Object { @@ -1803,6 +1804,12 @@ Object { "radix": Array [ "error", ], + "react-hooks/exhaustive-deps": Array [ + "error", + ], + "react-hooks/rules-of-hooks": Array [ + "error", + ], "react/boolean-prop-naming": Array [ "off", Object {