Skip to content

Commit b8b11bf

Browse files
authored
Merge branch 'master' into fix/6742
2 parents f513065 + 90552da commit b8b11bf

File tree

6 files changed

+38
-38
lines changed

6 files changed

+38
-38
lines changed

.editorconfig

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@ trim_trailing_whitespace = true
88
insert_final_newline = true
99
max_line_length = 233
1010

11-
[*.json]
12-
indent_style = space
13-
indent_size = 2
14-
1511
[.prettierrc]
1612
indent_style = space
1713
indent_size = 2
1814

19-
[*.yml]
20-
indent_style = space
21-
indent_size = 2
22-
23-
[*.yaml]
15+
[*.{yml,yaml,json}]
2416
indent_style = space
2517
indent_size = 2
2618

.eslintrc.js

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
module.exports = {
2-
"root": true,
3-
"plugins": [
4-
"prettier",
5-
"node"
6-
],
7-
"extends": ["eslint:recommended", "plugin:node/recommended"],
8-
"env": {
9-
"node": true,
10-
"es6": true,
2+
root: true,
3+
plugins: ["prettier", "node"],
4+
extends: ["eslint:recommended", "plugin:node/recommended"],
5+
env: {
6+
node: true,
7+
es6: true
118
},
12-
"parserOptions": { "ecmaVersion": 2017 },
13-
"rules": {
9+
parserOptions: {
10+
ecmaVersion: 2017
11+
},
12+
rules: {
1413
"prettier/prettier": "error",
1514
"no-undef": "error",
1615
"no-extra-semi": "error",
@@ -25,7 +24,7 @@ module.exports = {
2524
"no-extra-bind": "warn",
2625
"no-process-exit": "warn",
2726
"no-use-before-define": "off",
28-
"no-unused-vars": ["error", { "args": "none" }],
27+
"no-unused-vars": ["error", { args: "none" }],
2928
"no-unsafe-negation": "error",
3029
"no-loop-func": "warn",
3130
"indent": "off",
@@ -34,16 +33,23 @@ module.exports = {
3433
"node/no-unsupported-features": "error",
3534
"node/no-deprecated-api": "error",
3635
"node/no-missing-import": "error",
37-
"node/no-missing-require": [
38-
"error",
39-
{
40-
"allowModules": [
41-
"webpack"
42-
]
43-
}
44-
],
36+
"node/no-missing-require": ["error", { allowModules: ["webpack"] }],
4537
"node/no-unpublished-bin": "error",
4638
"node/no-unpublished-require": "error",
4739
"node/process-exit-as-throw": "error"
48-
}
40+
},
41+
overrides: [
42+
{
43+
files: ["lib/**/*.runtime.js", "buildin/*.js", "hot/*.js"],
44+
env: {
45+
es6: false
46+
},
47+
globals: {
48+
Promise: false,
49+
},
50+
parserOptions: {
51+
ecmaVersion: 5
52+
}
53+
}
54+
]
4955
};

lib/HotModuleReplacement.runtime.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ module.exports = function() {
1919
var fn = function(request) {
2020
if (me.hot.active) {
2121
if (installedModules[request]) {
22-
if (!installedModules[request].parents.includes(moduleId))
22+
if (installedModules[request].parents.indexOf(moduleId) === -1)
2323
installedModules[request].parents.push(moduleId);
2424
} else {
2525
hotCurrentParents = [moduleId];
2626
hotCurrentChildModule = request;
2727
}
28-
if (!me.children.includes(request)) me.children.push(request);
28+
if (me.children.indexOf(request) === -1) me.children.push(request);
2929
} else {
3030
console.warn(
3131
"[HMR] unexpected require(" +
@@ -316,7 +316,7 @@ module.exports = function() {
316316
parentId: parentId
317317
};
318318
}
319-
if (outdatedModules.includes(parentId)) continue;
319+
if (outdatedModules.indexOf(parentId) !== -1) continue;
320320
if (parent.hot._acceptedDependencies[moduleId]) {
321321
if (!outdatedDependencies[parentId])
322322
outdatedDependencies[parentId] = [];
@@ -343,7 +343,7 @@ module.exports = function() {
343343
function addAllToSet(a, b) {
344344
for (var i = 0; i < b.length; i++) {
345345
var item = b[i];
346-
if (!a.includes(item)) a.push(item);
346+
if (a.indexOf(item) === -1) a.push(item);
347347
}
348348
}
349349

@@ -551,7 +551,7 @@ module.exports = function() {
551551
dependency = moduleOutdatedDependencies[i];
552552
cb = module.hot._acceptedDependencies[dependency];
553553
if (cb) {
554-
if (callbacks.includes(cb)) continue;
554+
if (callbacks.indexOf(cb) !== -1) continue;
555555
callbacks.push(cb);
556556
}
557557
}

open-bot.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ rules:
100100
```
101101
<details>
102102
<summary>Show remaining errors</summary>
103-
``` text
103+
104+
```text
104105
{{{remainingErrors}}}
105106
```
106107
</details>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@
102102
"build:examples": "cd examples && node buildAll.js",
103103
"pretest": "npm run lint-files",
104104
"lint-files": "npm run lint && npm run schema-lint",
105-
"lint": "eslint lib bin hot buildin \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\"",
105+
"lint": "eslint lib bin hot buildin \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"",
106106
"fix": "npm run lint -- --fix",
107-
"pretty-files": "prettier \"lib/**.*\" \"bin/**.*\" \"hot/**.*\" \"buildin/**.*\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" --write",
107+
"pretty-files": "prettier \"lib/**.*\" \"bin/**.*\" \"hot/**.*\" \"buildin/**.*\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\" --write",
108108
"schema-lint": "mocha test/*.lint.js --opts test/lint-mocha.opts",
109109
"benchmark": "mocha --max-old-space-size=4096 --harmony --trace-deprecation test/*.benchmark.js -R spec",
110110
"cover": "npm run cover:init && npm run cover:all && npm run cover:report",

schemas/ajv.absolutePath.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const errorMessage = (schema, data, message) => ({
1010
const getErrorFor = (shouldBeAbsolute, data, schema) => {
1111
const message = shouldBeAbsolute
1212
? `The provided value ${JSON.stringify(data)} is not an absolute path!`
13+
1314
: `A relative path is expected. However, the provided value ${JSON.stringify(
1415
data
1516
)} is an absolute path!`;

0 commit comments

Comments
 (0)