Skip to content

Commit d8e40aa

Browse files
committed
Merge commit '518d1e092cf17a943cdb34b0551f7cf412e9a9a7' into jest
# Conflicts: # package.json # yarn.lock
2 parents 7b5c351 + 518d1e0 commit d8e40aa

File tree

5 files changed

+45
-102
lines changed

5 files changed

+45
-102
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ max_line_length = 233
1212
indent_style = space
1313
indent_size = 2
1414

15+
[.prettierrc]
16+
indent_style = space
17+
indent_size = 2
18+
1519
[*.yml]
1620
indent_style = space
1721
indent_size = 2

.eslintrc.js

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
module.exports = {
22
"root": true,
3-
"plugins": ["node"],
3+
"plugins": [
4+
"prettier",
5+
"node"
6+
],
47
"extends": ["eslint:recommended", "plugin:node/recommended"],
58
"env": {
69
"node": true,
@@ -9,7 +12,7 @@ module.exports = {
912
},
1013
"parserOptions": { "ecmaVersion": 2017 },
1114
"rules": {
12-
"quotes": ["error", "double"],
15+
"prettier/prettier": "error",
1316
"no-undef": "error",
1417
"no-extra-semi": "error",
1518
"semi": "error",
@@ -21,36 +24,12 @@ module.exports = {
2124
"brace-style": "error",
2225
"eol-last": "error",
2326
"no-extra-bind": "warn",
24-
"no-empty": "off",
25-
"no-multiple-empty-lines": "error",
26-
"no-multi-spaces": "error",
2727
"no-process-exit": "warn",
28-
"space-in-parens": "error",
29-
"no-trailing-spaces": "error",
3028
"no-use-before-define": "off",
3129
"no-unused-vars": ["error", { "args": "none" }],
32-
"key-spacing": "error",
33-
"space-infix-ops": "error",
3430
"no-unsafe-negation": "error",
3531
"no-loop-func": "warn",
36-
"space-before-function-paren": ["error", "never"],
37-
"space-before-blocks": "error",
38-
"object-curly-spacing": ["error", "always"],
3932
"indent": "off",
40-
"keyword-spacing": ["error", {
41-
"after": false,
42-
"overrides": {
43-
"const": { "after": true },
44-
"try": { "after": true },
45-
"else": { "after": true },
46-
"throw": { "after": true },
47-
"case": { "after": true },
48-
"return": { "after": true },
49-
"finally": { "after": true },
50-
"do": { "after": true },
51-
"of": { "after": true }
52-
}
53-
}],
5433
"no-console": "off",
5534
"valid-jsdoc": "error",
5635
"node/no-unsupported-features": "error",

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"tabWidth": 2,
3+
"useTabs": true
4+
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"webpack-sources": "^1.0.1"
2727
},
2828
"devDependencies": {
29-
"beautify-lint": "^1.0.3",
3029
"benchmark": "^2.1.1",
3130
"bundle-loader": "~0.5.0",
3231
"codacy-coverage": "^2.0.1",
@@ -37,6 +36,7 @@
3736
"es6-promise-polyfill": "^1.1.1",
3837
"eslint": "^4.3.0",
3938
"eslint-plugin-node": "^5.1.1",
39+
"eslint-plugin-prettier": "^2.3.1",
4040
"express": "~4.13.1",
4141
"file-loader": "^1.1.6",
4242
"glob": "^7.1.2",
@@ -45,13 +45,13 @@
4545
"jade": "^1.11.0",
4646
"jade-loader": "~0.8.0",
4747
"jest": "^22.4.2",
48-
"js-beautify": "^1.5.10",
4948
"json-loader": "^0.5.7",
5049
"less": "^2.5.1",
5150
"less-loader": "^4.0.3",
5251
"lodash": "^4.17.4",
5352
"mocha": "^3.2.0",
5453
"mocha-lcov-reporter": "^1.0.0",
54+
"prettier": "^1.8.2",
5555
"raw-loader": "~0.5.0",
5656
"react": "^15.2.1",
5757
"react-dom": "^15.2.1",
@@ -101,10 +101,10 @@
101101
"circleci:lint": "npm run lint-files",
102102
"build:examples": "cd examples && node buildAll.js",
103103
"pretest": "npm run lint-files",
104-
"lint-files": "npm run lint && npm run beautify-lint && npm run schema-lint",
104+
"lint-files": "npm run lint && npm run schema-lint",
105105
"lint": "eslint lib bin hot buildin \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\"",
106106
"fix": "npm run lint -- --fix",
107-
"beautify-lint": "beautify-lint \"lib/**/*.js\" \"hot/**/*.js\" \"bin/**/*.js\" \"benchmark/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\"",
107+
"pretty-files": "prettier \"lib/**.*\" \"bin/**.*\" \"hot/**.*\" \"buildin/**.*\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" --write",
108108
"schema-lint": "node --no-deprecation --max-old-space-size=4096 --harmony node_modules/.bin/jest --testMatch '<rootDir>/test/*.lint.js'",
109109
"benchmark": "node --no-deprecation --max-old-space-size=4096 --harmony node_modules/.bin/jest --testMatch '<roorDir>/test/*.benchmark.js'",
110110
"cover": "npm run cover:init && npm run cover:all && npm run cover:report",
@@ -114,7 +114,7 @@
114114
"cover:unit": "node --no-deprecation --max-old-space-size=4096 --harmony node_modules/.bin/jest --testMatch '<rootDir>/test/*.unittest.js' --coverage",
115115
"cover:report": "echo report",
116116
"cover:report-min": "echo report --report lcovonly",
117-
"publish-patch": "npm run lint && npm run beautify-lint && mocha && npm version patch && git push && git push --tags && npm publish"
117+
"publish-patch": "npm run lint && jest && npm version patch && git push && git push --tags && npm publish"
118118
},
119119
"jest": {
120120
"setupTestFrameworkScriptFile": "<rootDir>/test/setupTestFramework.js",

yarn.lock

Lines changed: 27 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ async-limiter@~1.0.0:
280280
version "1.0.0"
281281
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
282282

283-
async@1.x, async@^1.4.0, async@^1.5.0:
283+
async@1.x, async@^1.4.0:
284284
version "1.5.2"
285285
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
286286

@@ -495,15 +495,6 @@ bcrypt-pbkdf@^1.0.0:
495495
dependencies:
496496
tweetnacl "^0.14.3"
497497

498-
beautify-lint@^1.0.3:
499-
version "1.0.4"
500-
resolved "https://registry.yarnpkg.com/beautify-lint/-/beautify-lint-1.0.4.tgz#954b10f0bcd0a93dd17d0ed519b8996b701247db"
501-
dependencies:
502-
async "^1.5.0"
503-
diff "^2.2.1"
504-
glob "^6.0.1"
505-
js-beautify "^1.5.10"
506-
507498
benchmark@^2.1.1:
508499
version "2.1.4"
509500
resolved "https://registry.yarnpkg.com/benchmark/-/benchmark-2.1.4.tgz#09f3de31c916425d498cc2ee565a0ebf3c2a5629"
@@ -529,7 +520,7 @@ bluebird@^2.3, bluebird@^2.9.x:
529520
version "2.11.0"
530521
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1"
531522

532-
bluebird@^3.0.5, bluebird@^3.5.0:
523+
bluebird@^3.5.0:
533524
version "3.5.1"
534525
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
535526

@@ -1023,13 +1014,6 @@ concat-stream@^1.5.0, concat-stream@^1.6.0:
10231014
readable-stream "^2.2.2"
10241015
typedarray "^0.0.6"
10251016

1026-
config-chain@~1.1.5:
1027-
version "1.1.11"
1028-
resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.11.tgz#aba09747dfbe4c3e70e766a6e41586e1859fc6f2"
1029-
dependencies:
1030-
ini "^1.3.4"
1031-
proto-list "~1.2.1"
1032-
10331017
console-browserify@^1.1.0:
10341018
version "1.1.0"
10351019
resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
@@ -1433,10 +1417,6 @@ diff@3.2.0:
14331417
version "3.2.0"
14341418
resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9"
14351419

1436-
diff@^2.2.1:
1437-
version "2.2.3"
1438-
resolved "https://registry.yarnpkg.com/diff/-/diff-2.2.3.tgz#60eafd0d28ee906e4e8ff0a52c1229521033bf99"
1439-
14401420
diff@^3.1.0, diff@^3.2.0:
14411421
version "3.4.0"
14421422
resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c"
@@ -1480,16 +1460,6 @@ ecc-jsbn@~0.1.1:
14801460
dependencies:
14811461
jsbn "~0.1.0"
14821462

1483-
editorconfig@^0.13.2:
1484-
version "0.13.3"
1485-
resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.13.3.tgz#e5219e587951d60958fd94ea9a9a008cdeff1b34"
1486-
dependencies:
1487-
bluebird "^3.0.5"
1488-
commander "^2.9.0"
1489-
lru-cache "^3.2.0"
1490-
semver "^5.1.0"
1491-
sigmund "^1.0.1"
1492-
14931463
ee-first@1.1.1:
14941464
version "1.1.1"
14951465
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
@@ -1613,6 +1583,13 @@ eslint-plugin-node@^5.1.1:
16131583
resolve "^1.3.3"
16141584
semver "5.3.0"
16151585

1586+
eslint-plugin-prettier@^2.3.1:
1587+
version "2.3.1"
1588+
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.3.1.tgz#e7a746c67e716f335274b88295a9ead9f544e44d"
1589+
dependencies:
1590+
fast-diff "^1.1.1"
1591+
jest-docblock "^21.0.0"
1592+
16161593
eslint-scope@^3.7.1:
16171594
version "3.7.1"
16181595
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
@@ -1868,6 +1845,10 @@ fast-deep-equal@^1.0.0:
18681845
version "1.0.0"
18691846
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff"
18701847

1848+
fast-diff@^1.1.1:
1849+
version "1.1.2"
1850+
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154"
1851+
18711852
fast-json-stable-stringify@^2.0.0:
18721853
version "2.0.0"
18731854
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
@@ -2179,16 +2160,6 @@ glob@^5.0.15:
21792160
once "^1.3.0"
21802161
path-is-absolute "^1.0.0"
21812162

2182-
glob@^6.0.1:
2183-
version "6.0.4"
2184-
resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22"
2185-
dependencies:
2186-
inflight "^1.0.4"
2187-
inherits "2"
2188-
minimatch "2 || 3"
2189-
once "^1.3.0"
2190-
path-is-absolute "^1.0.0"
2191-
21922163
glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2:
21932164
version "7.1.2"
21942165
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
@@ -2501,9 +2472,9 @@ inherits@2.0.1:
25012472
version "2.0.1"
25022473
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1"
25032474

2504-
ini@^1.3.4, ini@~1.3.0:
2505-
version "1.3.5"
2506-
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
2475+
ini@~1.3.0:
2476+
version "1.3.4"
2477+
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e"
25072478

25082479
inquirer@^3.0.6:
25092480
version "3.3.0"
@@ -2989,6 +2960,10 @@ jest-diff@^22.4.0:
29892960
jest-get-type "^22.1.0"
29902961
pretty-format "^22.4.0"
29912962

2963+
jest-docblock@^21.0.0:
2964+
version "21.2.0"
2965+
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414"
2966+
29922967
jest-docblock@^22.4.0:
29932968
version "22.4.0"
29942969
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.4.0.tgz#dbf1877e2550070cfc4d9b07a55775a0483159b8"
@@ -3191,15 +3166,6 @@ js-base64@^2.1.9:
31913166
version "2.4.0"
31923167
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.0.tgz#9e566fee624751a1d720c966cd6226d29d4025aa"
31933168

3194-
js-beautify@^1.5.10:
3195-
version "1.7.5"
3196-
resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.7.5.tgz#69d9651ef60dbb649f65527b53674950138a7919"
3197-
dependencies:
3198-
config-chain "~1.1.5"
3199-
editorconfig "^0.13.2"
3200-
mkdirp "~0.5.0"
3201-
nopt "~3.0.1"
3202-
32033169
js-tokens@^3.0.0, js-tokens@^3.0.2:
32043170
version "3.0.2"
32053171
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
@@ -3529,12 +3495,6 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1:
35293495
dependencies:
35303496
js-tokens "^3.0.0"
35313497

3532-
lru-cache@^3.2.0:
3533-
version "3.2.0"
3534-
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee"
3535-
dependencies:
3536-
pseudomap "^1.0.1"
3537-
35383498
lru-cache@^4.0.1, lru-cache@^4.1.1:
35393499
version "4.1.1"
35403500
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55"
@@ -3882,7 +3842,7 @@ node-pre-gyp@^0.6.39:
38823842
tar "^2.2.1"
38833843
tar-pack "^3.4.0"
38843844

3885-
nopt@3.x, nopt@~3.0.1:
3845+
nopt@3.x:
38863846
version "3.0.6"
38873847
resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
38883848
dependencies:
@@ -4498,6 +4458,10 @@ preserve@^0.2.0:
44984458
version "0.2.0"
44994459
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
45004460

4461+
prettier@^1.8.2:
4462+
version "1.8.2"
4463+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8"
4464+
45014465
pretty-format@^22.4.0:
45024466
version "22.4.0"
45034467
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.4.0.tgz#237b1f7e1c50ed03bc65c03ccc29d7c8bb7beb94"
@@ -4551,10 +4515,6 @@ prop-types@^15.5.10:
45514515
loose-envify "^1.3.1"
45524516
object-assign "^4.1.1"
45534517

4554-
proto-list@~1.2.1:
4555-
version "1.2.4"
4556-
resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849"
4557-
45584518
proxy-addr@~1.0.10:
45594519
version "1.0.10"
45604520
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.0.10.tgz#0d40a82f801fc355567d2ecb65efe3f077f121c5"
@@ -4566,7 +4526,7 @@ prr@~1.0.1:
45664526
version "1.0.1"
45674527
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
45684528

4569-
pseudomap@^1.0.1, pseudomap@^1.0.2:
4529+
pseudomap@^1.0.2:
45704530
version "1.0.2"
45714531
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
45724532

@@ -5071,7 +5031,7 @@ semver@5.3.0:
50715031
version "5.3.0"
50725032
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
50735033

5074-
semver@^5.1.0, semver@^5.3.0:
5034+
semver@^5.3.0:
50755035
version "5.4.1"
50765036
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
50775037

@@ -5178,10 +5138,6 @@ shellwords@^0.1.1:
51785138
version "0.1.1"
51795139
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
51805140

5181-
sigmund@^1.0.1:
5182-
version "1.0.1"
5183-
resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
5184-
51855141
signal-exit@^3.0.0, signal-exit@^3.0.2:
51865142
version "3.0.2"
51875143
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"

0 commit comments

Comments
 (0)