Skip to content

Commit 5ee2524

Browse files
committed
feat(config/eslint): add consistent entrypoint for React preset
Expose the React-specific ESLint preset at `@hover/javascript/eslint/react` (we'll deprecate `@hover/javascript/eslint-react` soon) and add documentation for the React preset
1 parent 5eabc54 commit 5ee2524

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,21 @@ module.exports = {
116116
}
117117
```
118118

119+
##### React Preset
120+
121+
> ℹ️ The standard preset attempts to detect a React dependency and enable this
122+
> preset automatically so this is usually only necessary in edge cases where
123+
> React is not detected (such as a monorepo)
124+
125+
A React preset is available that includes additional React-specific rules as
126+
well as the **eslint-plugin-react-hooks** plugin.
127+
128+
```js
129+
module.exports = {
130+
extends: require.resolve('@hover/javascript/eslint/react'),
131+
}
132+
```
133+
119134
#### Prettier
120135

121136
Or, for Prettier, a `.prettierrc.js` with:

eslint/react.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('../dist/config/eslintrc-react')

0 commit comments

Comments
 (0)