Skip to content

Commit

Permalink
fix: added react documentation and peerDependencies to README
Browse files Browse the repository at this point in the history
  • Loading branch information
dworak-dev committed May 26, 2023
1 parent 5f7eca6 commit 6945922
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# @dworac/eslint-config-typescript-react

ESLint is a popular tool that helps maintain consistent code quality across a project. The template you provided comes with a pre-configured ESLint setup that has support for TypeScript, the AirBnB preset, Prettier, and JSDoc. Let's take a closer look at each of these components and the configuration for the template.
ESLint is a popular tool that helps maintain consistent code quality across a project. The template you provided comes with a pre-configured ESLint setup that has support for TypeScript, the AirBnB preset, Prettier, React and JSDoc. Let's take a closer look at each of these components and the configuration for the template.

## Usage

To use the ESLint configuration, you must first install the required dependencies:

```bash
yarn add -D @dworac/eslint-config-typescript-react
yarn add -D @dworac/eslint-config-typescript-react typescript
```

Then, add the following to your `.eslintrc.js` file:
Expand Down Expand Up @@ -79,6 +79,25 @@ settings: {
},
```

### React
This eslint configuration comes with react support. These are the lines that add React support:

```javascript
extends: [
// ...
"plugin:react/recommended",
'plugin:react-hooks/recommended',
],
plugins: [
// ...
'react-refresh'
],
rules: {
// ...
'react-refresh/only-export-components': 'warn',
},
```

## Contributing
If you have any suggestions or improvements, please feel free to create a pull request or submit an issue.

Expand Down

0 comments on commit 6945922

Please sign in to comment.