@zohodesk/codestandard-validator 0.0.2-exp-10 → 0.0.2-exp-11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -275,17 +275,9 @@ async function preCommitHook() {
|
|
|
275
275
|
Logger.log(Logger.INFO_TYPE, 'Error executing pre commit hook');
|
|
276
276
|
}
|
|
277
277
|
if (shouldAbortCommit) {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
} else if (hasEslintErrorsInFiles && areFilesStaged) {
|
|
282
|
-
Logger.log(Logger.FAILURE_TYPE, `There are eslint errors present. So commit is aborted`);
|
|
283
|
-
process.exit(1);
|
|
284
|
-
} else if (!hasEslintErrorsInFiles && !hasEslintErrorsInChangedLines && areFilesStaged) {
|
|
285
|
-
Logger.log(Logger.SUCCESS_TYPE, `Commit Successful`);
|
|
286
|
-
process.exit(0);
|
|
287
|
-
}
|
|
288
|
-
} else if (!shouldAbortCommit && areFilesStaged) {
|
|
278
|
+
Logger.log(Logger.FAILURE_TYPE, `There are eslint errors present. So commit is aborted. If possible try to fix the eslint warnings also.`);
|
|
279
|
+
process.exit(1);
|
|
280
|
+
} else {
|
|
289
281
|
Logger.log(Logger.SUCCESS_TYPE, `Commit Successful`);
|
|
290
282
|
process.exit(0);
|
|
291
283
|
}
|
|
@@ -14,6 +14,7 @@ const path = require("path");
|
|
|
14
14
|
* @property {string} tsConfigurationPath - The path of the ts configuration Path
|
|
15
15
|
* @property {number} projectId - project id of repository
|
|
16
16
|
* @property {boolean} impactBasedPrecommit - Indicates if the linting is impact-based in pre commit
|
|
17
|
+
* @property {boolean} shouldWarningsAbortCommit - Indicates if eslint warnings should abort the commit
|
|
17
18
|
* @property {string} token - Encrypted Authentication Token
|
|
18
19
|
* @property {string} compareBranch - Branch to compare diff
|
|
19
20
|
*/
|