eslint-plugin-disable-autofix
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -39,6 +39,6 @@ "use strict"; | ||
const getBuiltIn = node_fs_1.default | ||
.readdirSync(node_path_1.default.join(node_path_1.default.resolve(), 'node_modules/eslint/lib/rules')) | ||
.readdirSync(node_path_1.default.join(__dirname, 'node_modules/eslint/lib/rules')) | ||
.filter((builtIn) => builtIn.includes('.js')); | ||
for (const builtIn of getBuiltIn) { | ||
importedBuiltIns.push(Promise.resolve().then(() => __importStar(require(node_path_1.default.join(node_path_1.default.resolve(), 'node_modules/eslint/lib/rules/', builtIn))))); | ||
importedBuiltIns.push(Promise.resolve().then(() => __importStar(require(node_path_1.default.join(__dirname, 'node_modules/eslint/lib/rules/', builtIn))))); | ||
} | ||
@@ -58,3 +58,3 @@ const getAllRules = async () => { | ||
const getPlugins = node_fs_1.default | ||
.readdirSync(node_path_1.default.join(node_path_1.default.resolve(), 'node_modules/')) | ||
.readdirSync(node_path_1.default.join(__dirname, 'node_modules/')) | ||
.filter((plugin) => (plugin.startsWith('eslint-plugin') || | ||
@@ -69,6 +69,6 @@ (plugin.startsWith('@') && /eslint/u.test(plugin))) && | ||
const pluginDirectory = node_fs_1.default | ||
.readdirSync(node_path_1.default.join(node_path_1.default.resolve(), 'node_modules/', plugin)) | ||
.readdirSync(node_path_1.default.join(__dirname, 'node_modules/', plugin)) | ||
.find((read) => /plugin/u.test(read)); | ||
if (pluginDirectory) { | ||
copyIt = node_path_1.default.join(node_path_1.default.resolve(), 'node_modules/', plugin, pluginDirectory); | ||
copyIt = node_path_1.default.join(__dirname, 'node_modules/', plugin, pluginDirectory); | ||
} | ||
@@ -75,0 +75,0 @@ } |
{ | ||
"name": "eslint-plugin-disable-autofix", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Disable ESLint autofix (--fix) for specified rules", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
8489