From 86832dc43f7f534b84601859d2b3aa38698145b3 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Wed, 5 Jun 2024 01:29:14 +0300 Subject: [PATCH] Add eslint import/no-unresolved --- mon/.eslintrc.js | 5 +++++ mon/package.json | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mon/.eslintrc.js b/mon/.eslintrc.js index 0cca88f9..c5e944bf 100644 --- a/mon/.eslintrc.js +++ b/mon/.eslintrc.js @@ -11,6 +11,7 @@ module.exports = { "ecmaVersion": 2020 }, "plugins": [ + "import" ], "rules": { "indent": [ @@ -44,6 +45,10 @@ module.exports = { ], "node/shebang": [ "off" + ], + "import/no-unresolved": [ + 2, + { "commonjs": true } ] } }; diff --git a/mon/package.json b/mon/package.json index 681e4779..898ba622 100644 --- a/mon/package.json +++ b/mon/package.json @@ -4,7 +4,7 @@ "description": "Vitastor SDS monitor service", "main": "mon-main.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "lint": "eslint *.js" }, "author": "Vitaliy Filippov", "license": "UNLICENSED", @@ -14,12 +14,10 @@ }, "devDependencies": { "eslint": "^8.0.0", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-node": "^11.1.0" }, "engines": { "node": ">=12.0.0" - }, - "scripts": { - "lint": "eslint *.js" } }