From ab46e19b9f64f6507020524986ebbac37338f0d7 Mon Sep 17 00:00:00 2001 From: MariaAga Date: Mon, 3 Jul 2023 13:48:03 +0200 Subject: [PATCH] Fixes #36564 - Add eslint rule to alert missing ouia-ids --- .eslintrc | 5 ++++- .github/workflows/js_ci.yml | 3 +++ package.json | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index da6c101fd..a0b0baef5 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,5 +1,8 @@ { - "plugins": ["@theforeman/foreman"], + "plugins": [ + "@theforeman/foreman", + "@theforeman/rules" + ], "extends": [ "plugin:@theforeman/foreman/core", "plugin:@theforeman/foreman/plugins" diff --git a/.github/workflows/js_ci.yml b/.github/workflows/js_ci.yml index e288e12ab..66014a882 100644 --- a/.github/workflows/js_ci.yml +++ b/.github/workflows/js_ci.yml @@ -24,6 +24,9 @@ jobs: - name: Run plugin linter run: | npm run lint + - name: Run custom plugin linter + run: | + npm run lint:custom - name: Run plugin tests run: | npm run test diff --git a/package.json b/package.json index 83beaf0f3..523373995 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "license": "GPL-3.0", "scripts": { "lint": "tfm-lint --plugin -d /webpack", + "lint:custom": "eslint ./webpack", "test": "tfm-test --plugin", "test:watch": "tfm-test --plugin --watchAll", "test:current": "tfm-test --plugin --watch", @@ -23,6 +24,7 @@ "@babel/core": "^7.7.0", "@theforeman/builder": "^12.0.1", "@theforeman/eslint-plugin-foreman": "^12.0.1", + "@theforeman/eslint-plugin-rules": "^12.0.2", "@theforeman/test": "^12.0.1", "@theforeman/vendor-dev": "^12.0.1", "babel-eslint": "^10.0.0",