File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 8787[ ESLint documentation] ( http://eslint.org/docs/user-guide/configuring#extending-configuration-files )
8888for more information about extending configuration files.
8989
90+ ### All
91+
92+ If you want to enable all rules instead of only some you can do so by adding the
93+ ` all ` configuration to your ` .eslintrc ` config file:
94+
95+ ``` json
96+ {
97+ "extends" : [" plugin:jest/all" ]
98+ }
99+ ```
100+
101+ While the ` recommended ` and ` style ` configurations only change in major versions
102+ the ` all ` configuration may change in any release and is thus unsuited for
103+ installations requiring long-term consistency.
104+
90105## Rules
91106
92107| Rule | Description | Recommended | Fixable |
Original file line number Diff line number Diff line change @@ -11,11 +11,22 @@ const rules = fs
1111 ( acc , curr ) => Object . assign ( acc , { [ curr ] : require ( `./rules/${ curr } ` ) } ) ,
1212 { } ,
1313 ) ;
14+ let allRules = { } ;
15+ Object . keys ( rules ) . forEach ( function ( key ) {
16+ allRules [ `jest/${ key } ` ] = 'error' ;
17+ } ) ;
1418
1519const snapshotProcessor = require ( './processors/snapshot-processor' ) ;
1620
1721module . exports = {
1822 configs : {
23+ all : {
24+ plugins : [ 'jest' ] ,
25+ env : {
26+ 'jest/globals' : true ,
27+ } ,
28+ rules : allRules ,
29+ } ,
1930 recommended : {
2031 plugins : [ 'jest' ] ,
2132 env : {
You can’t perform that action at this time.
0 commit comments