From d49b1471b01e112d1d409fcd67e42d71581f451b Mon Sep 17 00:00:00 2001 From: robyngit Date: Tue, 2 Jul 2024 14:58:42 -0400 Subject: [PATCH] eslint config: turn off import/no-unresolved; _ for unused vars Issue #2475 --- eslint.config.mjs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 2fcb025eb..a02156544 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -29,6 +29,18 @@ const airbnbRulesOverrides = { // We are using the AMD/RequireJS module pattern "import/no-amd": "off", "import/no-commonjs": "off", + // We are using RequireJS + "import/no-unresolved": "off", + // Allow unused variables if they start with an underscore + "variables/no-unused-vars": [ + "error", + { + vars: "all", + args: "after-used", + ignoreRestSiblings: true, + varsIgnorePattern: "^_", + }, + ], }; // --------------------------------------------------------------------- @@ -46,7 +58,7 @@ const jsdocsRulesOverrides = { }; // --------------------------------------------------------------------- -// REQUIREJS +// REQUIREJS: // Use all rules from the recommended config for RequireJS const requirejsConfig = { name: "requirejs", @@ -59,7 +71,7 @@ const requirejsConfig = { }; // --------------------------------------------------------------------- -// METACATUI OVERRIDES +// METACATUI OVERRIDES: const metacatuiConfig = { files: ["src/**/*.js"], languageOptions: {