From 3ee8344cd94555afa5aad043a5ba3ef41e18baec Mon Sep 17 00:00:00 2001 From: Andrew Kazakov Date: Wed, 30 Sep 2026 15:21:48 +0300 Subject: [PATCH] fix: add type to array items and object properties in rule options schema --- .gitignore | 1 + lib/rules/order-in-components.js | 3 +++ lib/rules/order-in-controllers.js | 3 +++ lib/rules/order-in-models.js | 3 +++ lib/rules/order-in-routes.js | 3 +++ lib/rules/template-no-bare-strings.js | 5 ++++- 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c7fd675f75..8b3693b76d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ coverage npm-debug.log *.swp .vscode +.DS_Store # eslint-remote-tester eslint-remote-tester-results diff --git a/lib/rules/order-in-components.js b/lib/rules/order-in-components.js index 7dfab242d4..d8ad662b71 100644 --- a/lib/rules/order-in-components.js +++ b/lib/rules/order-in-components.js @@ -54,6 +54,9 @@ module.exports = { type: 'array', uniqueItems: true, minItems: 1, + items: { + anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }], + }, }, }, additionalProperties: false, diff --git a/lib/rules/order-in-controllers.js b/lib/rules/order-in-controllers.js index 40ae293a66..22d5422326 100644 --- a/lib/rules/order-in-controllers.js +++ b/lib/rules/order-in-controllers.js @@ -45,6 +45,9 @@ module.exports = { type: 'array', uniqueItems: true, minItems: 1, + items: { + anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }], + }, }, }, additionalProperties: false, diff --git a/lib/rules/order-in-models.js b/lib/rules/order-in-models.js index 73de1ab829..1ce877235f 100644 --- a/lib/rules/order-in-models.js +++ b/lib/rules/order-in-models.js @@ -39,6 +39,9 @@ module.exports = { type: 'array', uniqueItems: true, minItems: 1, + items: { + anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }], + }, }, }, additionalProperties: false, diff --git a/lib/rules/order-in-routes.js b/lib/rules/order-in-routes.js index ae93c8b247..3b4248855a 100644 --- a/lib/rules/order-in-routes.js +++ b/lib/rules/order-in-routes.js @@ -52,6 +52,9 @@ module.exports = { type: 'array', uniqueItems: true, minItems: 1, + items: { + anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }], + }, }, }, additionalProperties: false, diff --git a/lib/rules/template-no-bare-strings.js b/lib/rules/template-no-bare-strings.js index 96b6f992ef..8cb4cc7175 100644 --- a/lib/rules/template-no-bare-strings.js +++ b/lib/rules/template-no-bare-strings.js @@ -151,7 +151,10 @@ module.exports = { properties: { allowlist: { type: 'array', items: { type: 'string' } }, globalAttributes: { type: 'array', items: { type: 'string' } }, - elementAttributes: { type: 'object' }, + elementAttributes: { + type: 'object', + additionalProperties: { type: 'array', items: { type: 'string' } }, + }, ignoredElements: { type: 'array', items: { type: 'string' } }, }, additionalProperties: false,