From 3a4415271fc92927574ce8c4aeae75ae50fec2e2 Mon Sep 17 00:00:00 2001 From: splincode Date: Mon, 13 Nov 2023 12:12:34 +0300 Subject: [PATCH] feat(eslint-plugin-experience): use `forEach` instead of `for-of` --- .../eslint-plugin-experience/configs/no-restricted-syntax.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/eslint-plugin-experience/configs/no-restricted-syntax.js b/projects/eslint-plugin-experience/configs/no-restricted-syntax.js index fe7cc53f..cc95d64f 100644 --- a/projects/eslint-plugin-experience/configs/no-restricted-syntax.js +++ b/projects/eslint-plugin-experience/configs/no-restricted-syntax.js @@ -44,6 +44,10 @@ module.exports = { message: "Use `map(x => x?.foo?.bar)` instead of `pluck('foo', 'bar')`", }, + { + selector: 'ForOfStatement', + message: 'Use `forEach` instead of `for-of`', + }, ], }, },