Skip to content

Commit

Permalink
feat: react conf
Browse files Browse the repository at this point in the history
  • Loading branch information
danielc92 committed May 8, 2023
1 parent ce848e3 commit 4e1ce1a
Show file tree
Hide file tree
Showing 8 changed files with 2,009 additions and 15 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,26 @@ create a eslint config file `.eslintrc.js`
```js
module.exports = { extends: ["eslint-config-platypus"] }
```

The default configuration contains rules for
- code quality
- formatting
- jest
- secrets
- typescript

If you wish to also the React configuration, which includes react hooks and react rules, install additional dependencies:

```
npm i eslint-plugin-react eslint-plugin-react-hooks --save-dev
```

Next extend the eslint config

```js
module.exports = { extends: [
"eslint-config-platypus",
"eslint-config-platypus/react-addon"
] }
```
```
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const base = require('./src/configs/base');

module.exports = {

... base,
...base,
'extends': [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:promise/recommended' ],
'plugins': [ '@typescript-eslint', 'no-secrets', 'sonarjs', 'promise' ],
'parser': '@typescript-eslint/parser',
Expand Down

0 comments on commit 4e1ce1a

Please sign in to comment.