fix(linter rules): unsupported operator in node, relative require

This commit is contained in:
byzyk 2018-06-14 12:09:39 +04:00
parent 0cb11096f5
commit af56c69af5
6 changed files with 9 additions and 12 deletions

View File

@ -1,5 +1,4 @@
// eslint-disable-next-line node/no-extraneous-require
const webpack = require("webpack");
const webpack = require("../");
const path = require("path");
webpack(

View File

@ -1,5 +1,4 @@
// eslint-disable-next-line node/no-extraneous-require
const webpack = require("webpack");
const webpack = require("../../");
const path = require("path");
const testCase = process.argv[2];

View File

@ -6,7 +6,7 @@ const fixtures = path.join(__dirname, "fixtures");
try {
fs.mkdirSync(fixtures);
} catch (e) {
// catch here
// The directory already exists
}
function generateRequireString(conditional, suffix) {

View File

@ -6,7 +6,7 @@ const fixtures = path.join(__dirname, "fixtures");
try {
fs.mkdirSync(fixtures);
} catch (e) {
// catch here
// The directory already exists
}
function genModule(prefix, depth, asyncDepth, multiplex, r, circular) {
@ -20,7 +20,7 @@ function genModule(prefix, depth, asyncDepth, multiplex, r, circular) {
try {
fs.mkdirSync(path.resolve(fixtures, prefix));
} catch (e) {
// catch here
// The directory already exists
}
if (depth > 0) {
for (let i = 0; i < m; i++) {

View File

@ -67,8 +67,7 @@ function createTree(fs, count, folder) {
}
make(
`${prefix}-${i}`,
// eslint-disable-next-line node/no-unsupported-features
depth > 4 || count > 30 ? 0 : count + depth + i ** 2,
depth > 4 || count > 30 ? 0 : count + depth + Math.pow(i, 2),
depth + 1
);
}

View File

@ -4700,9 +4700,9 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
prettier@^1.13.2:
version "1.13.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.2.tgz#412b87bc561cb11074d2877a33a38f78c2303cda"
prettier@^1.13.5:
version "1.13.5"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.5.tgz#7ae2076998c8edce79d63834e9b7b09fead6bfd0"
pretty-format@^23.0.1:
version "23.0.1"