Browse Source

fixed jest

Daniel Zlotin 7 years ago
parent
commit
229a039ea3
3 changed files with 15 additions and 21 deletions
  1. 8
    14
      .eslintrc
  2. 2
    2
      package.json
  3. 5
    5
      yarn.lock

+ 8
- 14
.eslintrc View File

354
      *                             ECMAScript 6
354
      *                             ECMAScript 6
355
      */
355
      */
356
     "arrow-body-style": 0,
356
     "arrow-body-style": 0,
357
-    "arrow-parens": 0,
357
+    "arrow-parens": [
358
+      "error",
359
+      "always"
360
+    ],
358
     "arrow-spacing": [
361
     "arrow-spacing": [
359
       "error",
362
       "error",
360
       {
363
       {
363
       }
366
       }
364
     ],
367
     ],
365
     "constructor-super": "error",
368
     "constructor-super": "error",
366
-    "generator-star-spacing": 0,
369
+    "generator-star-spacing": [
370
+      "error",
371
+      "after"
372
+    ],
367
     "no-class-assign": "error",
373
     "no-class-assign": "error",
368
     "no-confusing-arrow": "error",
374
     "no-confusing-arrow": "error",
369
     "no-const-assign": "error",
375
     "no-const-assign": "error",
492
     /*
498
     /*
493
      *                              babel plugin
499
      *                              babel plugin
494
      */
500
      */
495
-    "babel/generator-star-spacing": [
496
-      "error",
497
-      "after"
498
-    ],
499
     "babel/new-cap": [
501
     "babel/new-cap": [
500
       "error",
502
       "error",
501
       {
503
       {
504
         ]
506
         ]
505
       }
507
       }
506
     ],
508
     ],
507
-    "babel/array-bracket-spacing": [
508
-      "error",
509
-      "never"
510
-    ],
511
     "babel/object-curly-spacing": [
509
     "babel/object-curly-spacing": [
512
       "error",
510
       "error",
513
       "never"
511
       "never"
514
     ],
512
     ],
515
     "babel/object-shorthand": 0,
513
     "babel/object-shorthand": 0,
516
-    "babel/arrow-parens": [
517
-      "error",
518
-      "always"
519
-    ],
520
     "babel/no-await-in-loop": 0
514
     "babel/no-await-in-loop": 0
521
   }
515
   }
522
 }
516
 }

+ 2
- 2
package.json View File

46
     "babel-register": "6.x.x",
46
     "babel-register": "6.x.x",
47
     "babel-jest": "17.x.x",
47
     "babel-jest": "17.x.x",
48
     "eslint": "3.x.x",
48
     "eslint": "3.x.x",
49
-    "eslint-plugin-babel": "3.x.x",
49
+    "eslint-plugin-babel": "4.x.x",
50
     "eslint-plugin-react": "6.x.x",
50
     "eslint-plugin-react": "6.x.x",
51
     "eslint-plugin-react-native": "2.x.x",
51
     "eslint-plugin-react-native": "2.x.x",
52
     "jest": "17.x.x",
52
     "jest": "17.x.x",
56
   "jest": {
56
   "jest": {
57
     "preset": "react-native",
57
     "preset": "react-native",
58
     "testPathDirs": [
58
     "testPathDirs": [
59
-      "src2"
59
+      "node_modules", "src2"
60
     ],
60
     ],
61
     "resetMocks": true,
61
     "resetMocks": true,
62
     "resetModules": true
62
     "resetModules": true

+ 5
- 5
yarn.lock View File

1875
     esrecurse "^4.1.0"
1875
     esrecurse "^4.1.0"
1876
     estraverse "^4.1.1"
1876
     estraverse "^4.1.1"
1877
 
1877
 
1878
-eslint-plugin-babel@3.x.x:
1879
-  version "3.3.0"
1880
-  resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-3.3.0.tgz#2f494aedcf6f4aa4e75b9155980837bc1fbde193"
1878
+eslint-plugin-babel@4.x.x:
1879
+  version "4.0.0"
1880
+  resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-4.0.0.tgz#a92114e2c493ac3034b030d7ecf96e174a76ef3f"
1881
 
1881
 
1882
 eslint-plugin-react-native@2.x.x:
1882
 eslint-plugin-react-native@2.x.x:
1883
   version "2.2.0"
1883
   version "2.2.0"
4672
   dependencies:
4672
   dependencies:
4673
     align-text "^0.1.1"
4673
     align-text "^0.1.1"
4674
 
4674
 
4675
-rimraf@2, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@~2.5.1, rimraf@~2.5.4:
4675
+rimraf@2, rimraf@^2.2.0, rimraf@^2.2.8, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@~2.5.1, rimraf@~2.5.4:
4676
   version "2.5.4"
4676
   version "2.5.4"
4677
   resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04"
4677
   resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04"
4678
   dependencies:
4678
   dependencies:
4679
     glob "^7.0.5"
4679
     glob "^7.0.5"
4680
 
4680
 
4681
-rimraf@^2.2.0, rimraf@^2.2.8, rimraf@~2.2.6:
4681
+rimraf@~2.2.6:
4682
   version "2.2.8"
4682
   version "2.2.8"
4683
   resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582"
4683
   resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582"
4684
 
4684