File tree Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,33 @@ module.exports = {
66
66
}
67
67
```
68
68
69
+ ### Jest
70
+
71
+ We recommend using Jest as a test runner.
72
+
73
+ ** terminal**
74
+ ``` sh
75
+ yarn add eslint-plugin-jest --dev
76
+ ```
77
+
78
+ ** .eslintrc.js**
79
+ ``` js
80
+ module .exports = {
81
+ extends: ' algolia/jest'
82
+ };
83
+ ```
84
+
85
+ ** package.json**
86
+ ``` json
87
+ {
88
+ "scripts" : {
89
+ "test" : " npm run lint" ,
90
+ "lint" : " eslint ." ,
91
+ "lint:fix" : " npm run lint -- --fix"
92
+ }
93
+ }
94
+ ```
95
+
69
96
### React
70
97
71
98
** terminal**
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ module.exports = {
4
4
browser : true ,
5
5
es6 : true ,
6
6
node : true ,
7
- jest : true ,
8
7
} ,
9
8
parser : 'babel-eslint' , // allows both flowtype and static class properties
10
9
parserOptions : {
@@ -16,11 +15,10 @@ module.exports = {
16
15
jsx : true ,
17
16
} ,
18
17
} ,
19
- plugins : [ 'import' , 'jest' , ' prettier'] ,
18
+ plugins : [ 'import' , 'prettier' ] ,
20
19
extends : [
21
20
'eslint:recommended' ,
22
21
'plugin:import/errors' ,
23
- 'plugin:jest/recommended' ,
24
22
'./rules/base.js' ,
25
23
'prettier' ,
26
24
] ,
Original file line number Diff line number Diff line change
1
+ // eslint-disable-next-line import/no-commonjs
2
+ module . exports = {
3
+ env : {
4
+ jest : true ,
5
+ } ,
6
+ extends : [ 'plugin:jest/recommended' , './base.js' ] ,
7
+ plugins : [ 'jest' ] ,
8
+ } ;
You can’t perform that action at this time.
0 commit comments