Skip to content

Commit acd9b20

Browse files
authored
Added ESLint config section (#158)
1 parent 3f978be commit acd9b20

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Issues can be funded by anyone and the money will be transparently distributed t
6969
- [TypeScript](#typescript)
7070
- [TSLib](#tslib)
7171
- [TSLint](#tslint)
72+
- [ESLint](#eslint)
7273
- [Jest](#jest)
7374
- [Style Guide](#style-guide)
7475
- [Recipes](#recipes)
@@ -1588,6 +1589,31 @@ We have our own recommended config that you can easily add to your project thank
15881589
15891590
[⇧ back to top](#table-of-contents)
15901591
1592+
## ESLint
1593+
https://eslint.org/
1594+
https://typescript-eslint.io
1595+
1596+
> Installation
1597+
`npm i -D eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin`
1598+
1599+
We have our own recommended config that will automatically add a parser & plugin for TypeScript thanks to [`react-redux-typescript-scripts`](https://github.com/piotrwitek/react-redux-typescript-scripts) package.
1600+
1601+
#### .eslintrc
1602+
<details><summary><i>Click to expand</i></summary><p>
1603+
1604+
```tsx
1605+
{
1606+
"extends": ["./node_modules/react-redux-typescript-scripts/eslint.js"],
1607+
"rules": {
1608+
// you can further customize options here
1609+
}
1610+
}
1611+
1612+
```
1613+
</p></details>
1614+
1615+
[⇧ back to top](#table-of-contents)
1616+
15911617
## Jest
15921618
https://jestjs.io/
15931619

README_SOURCE.md

+15
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Issues can be funded by anyone and the money will be transparently distributed t
6969
- [TypeScript](#typescript)
7070
- [TSLib](#tslib)
7171
- [TSLint](#tslint)
72+
- [ESLint](#eslint)
7273
- [Jest](#jest)
7374
- [Style Guide](#style-guide)
7475
- [Recipes](#recipes)
@@ -631,6 +632,20 @@ We have our own recommended config that you can easily add to your project thank
631632
632633
[⇧ back to top](#table-of-contents)
633634
635+
## ESLint
636+
https://eslint.org/
637+
https://typescript-eslint.io
638+
639+
> Installation
640+
`npm i -D eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin`
641+
642+
We have our own recommended config that will automatically add a parser & plugin for TypeScript thanks to [`react-redux-typescript-scripts`](https://github.com/piotrwitek/react-redux-typescript-scripts) package.
643+
644+
#### .eslintrc
645+
::expander='playground/.eslintrc'::
646+
647+
[⇧ back to top](#table-of-contents)
648+
634649
## Jest
635650
https://jestjs.io/
636651

playground/.eslintrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": ["./node_modules/react-redux-typescript-scripts/eslint.js"],
3+
"rules": {
4+
// you can further customize options here
5+
}
6+
}

0 commit comments

Comments
 (0)