@@ -273,6 +273,7 @@ define(function (require, exports, module) {
273273 Menus: require("command/Menus"),
274274 MultiRangeInlineEditor: require("editor/MultiRangeInlineEditor").MultiRangeInlineEditor,
275275 NativeApp: require("utils/NativeApp"),
276+ NodeUtils: require("utils/NodeUtils"),
276277 PerfUtils: require("utils/PerfUtils"),
277278 PreferencesManager: require("preferences/PreferencesManager"),
278279 ProjectManager: require("project/ProjectManager"),
@@ -51785,7 +51786,7 @@ define("language/CodeInspection", function (require, exports, module) {
5178551786 <td class="line-icon">
5178651787 <i class="{{iconClass}}"></i>
5178751788 </td>
51788- <td class="line-text">{{message}}</td>
51789+ <td class="line-text">{{message}}{{{htmlMessage}}} </td>
5178951790 <td>
5179051791 <button class="btn btn-mini table-copy-err-button" title="{{Strings.COPY_ERROR}}"
5179151792 data-message="{{message}}">
@@ -52644,7 +52645,7 @@ define("language/CodeInspection", function (require, exports, module) {
5264452645 .on("click", "tr", function (e) {
5264552646 if ($(e.target).hasClass('table-copy-err-button')) {
5264652647 // Retrieve the message from the data attribute of the clicked element
52647- const message = $(e.target).data('message' );
52648+ const message = $(e.target).parent().parent().find(".line-text").text( );
5264852649 message && Phoenix.app.copyToClipboard(message);
5264952650 }
5265052651 if ($selectedRow) {
@@ -87408,6 +87409,7 @@ define("nls/root/strings", {
8740887409
8740987410 // extensions/default/JSLint
8741087411 "JSHINT_NAME": "JSHint",
87412+ "ESLINT_NAME": "ESLint",
8741187413
8741287414 // extension css code hints
8741387415 "CSS_LINT_NAME": "{0} Lint",
@@ -87475,6 +87477,11 @@ define("nls/root/strings", {
8747587477 "DESCRIPTION_INSERT_HINT_ON_TAB": "true to insert the currently selected code hint on tab",
8747687478 "DESCRIPTION_NO_HINTS_ON_DOT": "true to not automatically show JS code hints when . is typed",
8747787479 "DESCRIPTION_JSHINT_DISABLE": "true to disable JSHints linter in problems panel",
87480+ "DESCRIPTION_ESLINT_DISABLE": "true to disable ESLint linter in problems panel",
87481+ "DESCRIPTION_ESLINT_FAILED": "ESLint Failed ({0}). Make sure the project contains valid <a href='https://eslint.org/docs/latest/use/configure/configuration-files'>Configuration Files</a>",
87482+ "DESCRIPTION_ESLINT_USE_NATIVE_APP": "ESLint is only available in the Desktop app. Download it from <a href='https://phcode.io'>phcode.io</a>",
87483+ "DESCRIPTION_ESLINT_LOAD_FAILED": "Failed to load ESLint for this project. {APP_NAME} supports only ESLint versions above 7.",
87484+ "DESCRIPTION_ESLINT_DO_NPM_INSTALL": "Please run `npm install` on your project to enable ESLint",
8747887485 "DESCRIPTION_LANGUAGE": "Language specific settings",
8747987486 "DESCRIPTION_LANGUAGE_FILE_EXTENSIONS": "Additional mappings from file extension to language name",
8748087487 "DESCRIPTION_LANGUAGE_FILE_NAMES": "Additional mappings from file name to language name",
@@ -141870,6 +141877,17 @@ define("utils/NodeUtils", function (require, exports, module) {
141870141877 return utilsConnector.execPeer("_npmInstallInFolder", {moduleNativeDir});
141871141878 }
141872141879
141880+ async function ESLintFile(text, fullFilePath, projectFullPath) {
141881+ if(!Phoenix.isNativeApp) {
141882+ throw new Error("ESLintFile not available in browser");
141883+ }
141884+ return utilsConnector.execPeer("ESLintFile", {
141885+ text,
141886+ fullFilePath: window.fs.getTauriPlatformPath(fullFilePath),
141887+ projectFullPath: window.fs.getTauriPlatformPath(projectFullPath)
141888+ });
141889+ }
141890+
141873141891 if(NodeConnector.isNodeAvailable()) {
141874141892 // todo we need to update the strings if a user extension adds its translations. Since we dont support
141875141893 // node extensions for now, should consider when we support node extensions.
@@ -141885,6 +141903,7 @@ define("utils/NodeUtils", function (require, exports, module) {
141885141903 exports.getPhoenixBinaryVersion = getPhoenixBinaryVersion;
141886141904 exports.getLinuxOSFlavorName = getLinuxOSFlavorName;
141887141905 exports.openUrlInBrowser = openUrlInBrowser;
141906+ exports.ESLintFile = ESLintFile;
141888141907 exports.isNodeReady = NodeConnector.isNodeReady;
141889141908
141890141909 window.NodeUtils = exports;
0 commit comments