eslint-plugin-diff
Advanced tools
Comparing version 1.0.14 to 1.0.15-0
@@ -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": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23311
279
1