Skip to content

Commit af56c69

Browse files
committed
fix(linter rules): unsupported operator in node, relative require
1 parent 0cb1109 commit af56c69

File tree

6 files changed

+9
-12
lines changed

6 files changed

+9
-12
lines changed

benchmark/createBenchmark.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// eslint-disable-next-line node/no-extraneous-require
2-
const webpack = require("webpack");
1+
const webpack = require("../");
32
const path = require("path");
43

54
webpack(

benchmark/createBenchmark/entry.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// eslint-disable-next-line node/no-extraneous-require
2-
const webpack = require("webpack");
1+
const webpack = require("../../");
32
const path = require("path");
43

54
const testCase = process.argv[2];

benchmark/createFixtures.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const fixtures = path.join(__dirname, "fixtures");
66
try {
77
fs.mkdirSync(fixtures);
88
} catch (e) {
9-
// catch here
9+
// The directory already exists
1010
}
1111

1212
function generateRequireString(conditional, suffix) {

benchmark/createFixtures2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const fixtures = path.join(__dirname, "fixtures");
66
try {
77
fs.mkdirSync(fixtures);
88
} catch (e) {
9-
// catch here
9+
// The directory already exists
1010
}
1111

1212
function genModule(prefix, depth, asyncDepth, multiplex, r, circular) {
@@ -20,7 +20,7 @@ function genModule(prefix, depth, asyncDepth, multiplex, r, circular) {
2020
try {
2121
fs.mkdirSync(path.resolve(fixtures, prefix));
2222
} catch (e) {
23-
// catch here
23+
// The directory already exists
2424
}
2525
if (depth > 0) {
2626
for (let i = 0; i < m; i++) {

benchmark/createTestCases.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ function createTree(fs, count, folder) {
6767
}
6868
make(
6969
`${prefix}-${i}`,
70-
// eslint-disable-next-line node/no-unsupported-features
71-
depth > 4 || count > 30 ? 0 : count + depth + i ** 2,
70+
depth > 4 || count > 30 ? 0 : count + depth + Math.pow(i, 2),
7271
depth + 1
7372
);
7473
}

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4700,9 +4700,9 @@ preserve@^0.2.0:
47004700
version "0.2.0"
47014701
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
47024702

4703-
prettier@^1.13.2:
4704-
version "1.13.2"
4705-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.2.tgz#412b87bc561cb11074d2877a33a38f78c2303cda"
4703+
prettier@^1.13.5:
4704+
version "1.13.5"
4705+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.5.tgz#7ae2076998c8edce79d63834e9b7b09fead6bfd0"
47064706

47074707
pretty-format@^23.0.1:
47084708
version "23.0.1"

0 commit comments

Comments
 (0)