From 23a7f37601f1e2f17969d6b4ef0ff6193f173e1c Mon Sep 17 00:00:00 2001 From: Stephen Hanson Date: Thu, 9 Nov 2023 22:51:06 -0600 Subject: [PATCH 1/2] Allow for...of loops These were restricted because browser support was lacking in 2018. Browser support is now at 97%. Additionally, not all of our users are writing for the browser. Finally, for...of loops are the simplest way to loop through arrays asynchronously in sequence. https://caniuse.com/?search=for...of --- rules/style.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/rules/style.js b/rules/style.js index d034eec..1108312 100644 --- a/rules/style.js +++ b/rules/style.js @@ -422,11 +422,6 @@ module.exports = { message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.', }, - { - selector: 'ForOfStatement', - message: - 'iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.', - }, { selector: 'LabeledStatement', message: From 51f29d6f0b33444d5fc6fef5b9ceb94d49bc6ba3 Mon Sep 17 00:00:00 2001 From: Stephen Hanson Date: Thu, 9 Nov 2023 22:53:59 -0600 Subject: [PATCH 2/2] Allow continue statements --- rules/style.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rules/style.js b/rules/style.js index 1108312..7232c2e 100644 --- a/rules/style.js +++ b/rules/style.js @@ -355,10 +355,6 @@ module.exports = { // https://eslint.org/docs/rules/no-bitwise 'no-bitwise': 'error', - // disallow use of the continue statement - // https://eslint.org/docs/rules/no-continue - 'no-continue': 'error', - // disallow comments inline after code 'no-inline-comments': 'off',