diff --git a/vs-code-extension/CHANGELOG.md b/vs-code-extension/CHANGELOG.md index df2b5d0..8ca7bee 100644 --- a/vs-code-extension/CHANGELOG.md +++ b/vs-code-extension/CHANGELOG.md @@ -1,4 +1,10 @@ # Change Log +## 4.1.7 +Fixed: + - The 'Merge post processor' feature does now utilize the include path if specified + - Fixed an issue where ESLint did not recognize the embedded rules file. +Updated: + - Updated embedded ESLint rules file. ## 4.1.6 Changed: - Option 'Download CNC exporting post processor' now redirects to the Fusion post library website diff --git a/vs-code-extension/out/src/extension.js b/vs-code-extension/out/src/extension.js index 65d2a8e..7b2fdad 100644 --- a/vs-code-extension/out/src/extension.js +++ b/vs-code-extension/out/src/extension.js @@ -253,20 +253,25 @@ function showPostEngineVersion() { } } -/** Merges the post processor with any files with the '.merge.cps' extension in the same directory */ +/** Merges the post processor with any files with the '.merged.cps' extension in the same directory */ function mergePost() { checkPostKernel(); let child = require('child_process').execFile; let parameters = []; postFile = getCpsPath(); - var mergeFile = postFile.split(".cps")[0] + ".merge.cps"; + var mergeFile = postFile.split(".cps")[0] + ".merged.cps"; parameters = [postFile, "--merge", mergeFile]; + + let includePath = vscode.workspace.getConfiguration("AutodeskPostUtility").get('includePath'); + if (fileExists(includePath)) { + parameters.push("--include", includePath); // Set the include path + } try { var _timeout = vscode.workspace.getConfiguration("AutodeskPostUtility").get("timeoutForPostProcessing"); _timeout *= 1000; // convert to milliseconds - child(postExecutable, parameters, { timeout: _timeout }, function (err, data) { - if (err) { - errorMessage("Merge failed."); + child(postExecutable, parameters, { timeout: _timeout }, function (err, stdout, stderr) { + if (stderr) { + errorMessage("Merge failed: " + stderr); } else { message("Merge successful. The merged post can be found in your post processors directory."); } @@ -1242,14 +1247,14 @@ function setEmbeddedEslintRules() { let newEditorConfiguration switch (vscode.workspace.getConfiguration("AutodeskPostUtility").get("useEmbeddedESLintRules")) { case "Disabled": - newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": false}); + newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": "never"}); newEslintConfiguration = Object.assign({}, currentEslintConfiguration.overrideConfigFile, {}); break; case "Show ESLint issues only": - newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": false}); + newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": "never"}); break; case "Show and fix ESLint issues": - newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": true}); + newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": "explicit"}); break; default: errorMessage("Unknown command for setting useEmbeddedESLintRules.") @@ -1257,6 +1262,7 @@ function setEmbeddedEslintRules() { } vscode.workspace.getConfiguration("eslint").update("options", newEslintConfiguration, true); vscode.workspace.getConfiguration("editor").update("codeActionsOnSave", newEditorConfiguration, true); + vscode.workspace.getConfiguration("eslint").update("useFlatConfig", false, true); } /** diff --git a/vs-code-extension/package.json b/vs-code-extension/package.json index 18634db..e14b493 100644 --- a/vs-code-extension/package.json +++ b/vs-code-extension/package.json @@ -2,7 +2,7 @@ "name": "hsm-post-processor", "displayName": "Autodesk Fusion Post Processor Utility", "description": "Post processor utility.", - "version": "4.1.6", + "version": "4.1.7", "icon": "res/icons/logo.png", "author": { "name": "Autodesk", diff --git a/vs-code-extension/res/.eslintrc.json b/vs-code-extension/res/.eslintrc.json index 1c0d314..4356104 100644 --- a/vs-code-extension/res/.eslintrc.json +++ b/vs-code-extension/res/.eslintrc.json @@ -150,7 +150,12 @@ "no-magic-numbers": "off", "no-mixed-operators": "off", "no-mixed-requires": "error", - "no-multi-spaces": "off", + "no-multi-spaces": ["error", { + "ignoreEOLComments": true, + "exceptions": { + "Property": true + } + }], "no-multi-str": "off", "no-multiple-empty-lines": [2, { "max": 1