Socket
Socket
Sign inDemoInstall

eslint-plugin-diff

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-diff - npm Package Compare versions

Comparing version 1.0.14 to 1.0.15-0

15

dist/git.js

@@ -28,6 +28,5 @@ "use strict";

const child_process = __importStar(require("child_process"));
const path = __importStar(require("path"));
const path_1 = require("path");
const Range_1 = require("./Range");
const COMMAND = "git";
const sanitizeFilePath = (filePath) => JSON.stringify(path.resolve(filePath));
const getDiffForFile = (filePath, staged = false) => {

@@ -43,5 +42,5 @@ var _a;

"--unified=0",
JSON.stringify((_a = process.env.ESLINT_PLUGIN_DIFF_COMMIT) !== null && _a !== void 0 ? _a : "HEAD"),
(_a = process.env.ESLINT_PLUGIN_DIFF_COMMIT) !== null && _a !== void 0 ? _a : "HEAD",
"--",
sanitizeFilePath(filePath),
(0, path_1.resolve)(filePath),
].reduce((acc, cur) => (typeof cur === "string" ? [...acc, cur] : acc), []);

@@ -61,3 +60,3 @@ return child_process.execFileSync(COMMAND, args).toString();

"--staged",
JSON.stringify((_a = process.env.ESLINT_PLUGIN_DIFF_COMMIT) !== null && _a !== void 0 ? _a : "HEAD"),
(_a = process.env.ESLINT_PLUGIN_DIFF_COMMIT) !== null && _a !== void 0 ? _a : "HEAD",
];

@@ -69,3 +68,3 @@ return child_process

.split("\n")
.map((filePath) => path.resolve(filePath));
.map((filePath) => (0, path_1.resolve)(filePath));
};

@@ -80,3 +79,3 @@ exports.getDiffFileList = getDiffFileList;

"--",
sanitizeFilePath(filePath),
(0, path_1.resolve)(filePath),
];

@@ -103,3 +102,3 @@ let result = true;

.split("\n")
.map((filePath) => path.resolve(filePath));
.map((filePath) => (0, path_1.resolve)(filePath));
return untrackedFileListCache;

@@ -106,0 +105,0 @@ };

{
"name": "eslint-plugin-diff",
"version": "1.0.14",
"version": "1.0.15-0",
"description": "Run ESLint on your changes only",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc