Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 8d62205

Browse files
committed
add eslint-watch && clean up eslint warnings
1 parent c267f80 commit 8d62205

File tree

6 files changed

+57
-8
lines changed

6 files changed

+57
-8
lines changed

containers/Body/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class ContentContainer extends React.Component {
9898

9999
render() {
100100
const { route } = this.props
101-
console.log('route: ', route)
101+
debug('route: ', route)
102102
return (
103103
<Body id="whereCallShowDoraemon">
104104
<AppHeader />

containers/Doraemon/helper/swissArmyKnife.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ export class SwissArmyKnife {
4242
})
4343
/* eslint-enable no-undef */
4444
} catch (e) {
45+
/* eslint-disable no-console */
4546
console.error('bad selector in scrollIntoViewIfNeeded', e)
47+
/* eslint-enable no-console */
4648
}
4749
}
4850

containers/Doraemon/logic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ const initCmdResolver = () => {
5050
{
5151
match: SAK.stepOneCmd('hforward'),
5252
action: () => {
53-
console.log('SAK.stepOneCmd hforward')
53+
debug('SAK.stepOneCmd hforward')
5454
},
5555
},
5656
{
5757
match: SAK.stepOneCmd('hbackward'),
5858
action: () => {
59-
console.log('SAK.stepOneCmd hbackward')
59+
debug('SAK.stepOneCmd hbackward')
6060
},
6161
},
6262
{

containers/GithubSearchPanel/Pigeon.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ export default class SearchService {
5050
.distinctUntilChanged()
5151
.switchMap(getGithubRepos)
5252
.catch(error => {
53+
/* eslint-disable no-console */
5354
console.error(error)
55+
/* eslint-enable no-console */
5456
return Observable.of([])
5557
})
5658
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"version": "0.0.1",
44
"license": "MIT",
55
"scripts": {
6-
"dev": "cross-env NODE_ENV=dev run-p server ",
6+
"dev": "cross-env NODE_ENV=dev run-p server lint:watch",
77
"lint": "eslint pages/**/*.js components/**/* containers/**/* stores/**/*",
8+
"lint:watch": "esw -w pages/**/*.js components/**/* containers/**/* stores/**/*",
89
"pretest": "npm run lint",
910
"test": "cross-env NODE_ENV=test jest",
1011
"test:watch": "npm run test -- --watch",
@@ -136,6 +137,7 @@
136137
"eslint-plugin-jsx-a11y": "^6.0.2",
137138
"eslint-plugin-prettier": "^2.2.0",
138139
"eslint-plugin-react": "7.4.0",
140+
"eslint-watch": "^3.1.3",
139141
"husky": "^0.14.3",
140142
"jest": "^21.0.2",
141143
"lint-staged": "^4.0.4",

yarn.lock

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,14 @@ babel-plugin-transform-strict-mode@^6.24.1:
10681068
babel-runtime "^6.22.0"
10691069
babel-types "^6.24.1"
10701070

1071+
babel-polyfill@^6.20.0:
1072+
version "6.26.0"
1073+
resolved "http://r.cnpmjs.org/babel-polyfill/download/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
1074+
dependencies:
1075+
babel-runtime "^6.26.0"
1076+
core-js "^2.5.0"
1077+
regenerator-runtime "^0.10.5"
1078+
10711079
babel-preset-env@1.6.0:
10721080
version "1.6.0"
10731081
resolved "http://r.cnpmjs.org/babel-preset-env/download/babel-preset-env-1.6.0.tgz#2de1c782a780a0a5d605d199c957596da43c44e4"
@@ -1296,6 +1304,10 @@ block-stream@*:
12961304
dependencies:
12971305
inherits "~2.0.0"
12981306

1307+
bluebird@^3.5.1:
1308+
version "3.5.1"
1309+
resolved "http://r.cnpmjs.org/bluebird/download/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
1310+
12991311
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:
13001312
version "4.11.8"
13011313
resolved "http://r.cnpmjs.org/bn.js/download/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
@@ -1593,7 +1605,7 @@ cheerio@^1.0.0-rc.2:
15931605
lodash "^4.15.0"
15941606
parse5 "^3.0.1"
15951607

1596-
chokidar@^1.7.0:
1608+
chokidar@^1.4.3, chokidar@^1.7.0:
15971609
version "1.7.0"
15981610
resolved "http://r.cnpmjs.org/chokidar/download/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468"
15991611
dependencies:
@@ -2629,6 +2641,23 @@ eslint-scope@^3.7.1:
26292641
esrecurse "^4.1.0"
26302642
estraverse "^4.1.1"
26312643

2644+
eslint-watch@^3.1.3:
2645+
version "3.1.3"
2646+
resolved "http://r.cnpmjs.org/eslint-watch/download/eslint-watch-3.1.3.tgz#e3882a93f02ba4d8a797562fa9c3815e3181c4ba"
2647+
dependencies:
2648+
babel-polyfill "^6.20.0"
2649+
bluebird "^3.5.1"
2650+
chalk "^2.1.0"
2651+
chokidar "^1.4.3"
2652+
debug "^3.0.1"
2653+
keypress "^0.2.1"
2654+
lodash "^4.17.4"
2655+
optionator "^0.8.2"
2656+
source-map-support "^0.5.0"
2657+
strip-ansi "^4.0.0"
2658+
text-table "^0.2.0"
2659+
unicons "0.0.3"
2660+
26322661
eslint@^4.6.1:
26332662
version "4.6.1"
26342663
resolved "http://r.cnpmjs.org/eslint/download/eslint-4.6.1.tgz#ddc7fc7fd70bf93205b0b3449bb16a1e9e7d4950"
@@ -4469,6 +4498,10 @@ junk@^1.0.1:
44694498
version "1.0.3"
44704499
resolved "http://r.cnpmjs.org/junk/download/junk-1.0.3.tgz#87be63488649cbdca6f53ab39bec9ccd2347f592"
44714500

4501+
keypress@^0.2.1:
4502+
version "0.2.1"
4503+
resolved "http://r.cnpmjs.org/keypress/download/keypress-0.2.1.tgz#1e80454250018dbad4c3fe94497d6e67b6269c77"
4504+
44724505
kind-of@^3.0.2:
44734506
version "3.2.2"
44744507
resolved "http://r.cnpmjs.org/kind-of/download/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
@@ -6550,7 +6583,7 @@ regenerate@^1.2.1:
65506583
version "1.3.2"
65516584
resolved "http://r.cnpmjs.org/regenerate/download/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260"
65526585

6553-
regenerator-runtime@^0.10.0:
6586+
regenerator-runtime@^0.10.0, regenerator-runtime@^0.10.5:
65546587
version "0.10.5"
65556588
resolved "http://r.cnpmjs.org/regenerator-runtime/download/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658"
65566589

@@ -7072,6 +7105,12 @@ source-map-support@^0.4.15:
70727105
dependencies:
70737106
source-map "^0.5.6"
70747107

7108+
source-map-support@^0.5.0:
7109+
version "0.5.0"
7110+
resolved "http://r.cnpmjs.org/source-map-support/download/source-map-support-0.5.0.tgz#2018a7ad2bdf8faf2691e5fddab26bed5a2bacab"
7111+
dependencies:
7112+
source-map "^0.6.0"
7113+
70757114
source-map@0.5.6:
70767115
version "0.5.6"
70777116
resolved "http://r.cnpmjs.org/source-map/download/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"
@@ -7086,7 +7125,7 @@ source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3, sour
70867125
version "0.5.7"
70877126
resolved "http://r.cnpmjs.org/source-map/download/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
70887127

7089-
source-map@^0.6.1:
7128+
source-map@^0.6.0, source-map@^0.6.1:
70907129
version "0.6.1"
70917130
resolved "http://r.cnpmjs.org/source-map/download/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
70927131

@@ -7445,7 +7484,7 @@ text-extensions@^1.0.0:
74457484
version "1.7.0"
74467485
resolved "http://r.cnpmjs.org/text-extensions/download/text-extensions-1.7.0.tgz#faaaba2625ed746d568a23e4d0aacd9bf08a8b39"
74477486

7448-
text-table@~0.2.0:
7487+
text-table@^0.2.0, text-table@~0.2.0:
74497488
version "0.2.0"
74507489
resolved "http://r.cnpmjs.org/text-table/download/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
74517490

@@ -7677,6 +7716,10 @@ unfetch@3.0.0:
76777716
version "3.0.0"
76787717
resolved "http://r.cnpmjs.org/unfetch/download/unfetch-3.0.0.tgz#8d1e0513a4ecd0e5ff2d41a6ba77771aae8b6482"
76797718

7719+
unicons@0.0.3:
7720+
version "0.0.3"
7721+
resolved "http://r.cnpmjs.org/unicons/download/unicons-0.0.3.tgz#6e6a7a1a6eaebb01ca3d8b12ad9687279eaba524"
7722+
76807723
universalify@^0.1.0:
76817724
version "0.1.1"
76827725
resolved "http://r.cnpmjs.org/universalify/download/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"

0 commit comments

Comments
 (0)