Skip to content

Commit

Permalink
feat(eslint): make no-await-in-loop browser-only
Browse files Browse the repository at this point in the history
Closes #63

BREAKING CHANGE: `no-await-in-loop` is now only in the `browser` config.
  • Loading branch information
mrmckeb committed Mar 4, 2024
1 parent 952aae0 commit 2275538
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion eslint/browser.js
@@ -1,5 +1,5 @@
module.exports = {
extends: require.resolve('./_base'),
extends: ['./_base', require.resolve('./rules/browser')],
env: {
browser: true,
},
Expand Down
10 changes: 10 additions & 0 deletions eslint/rules/browser.js
@@ -0,0 +1,10 @@
module.exports = {
rules: {
/**
* Disallow await inside of loops.
*
* 🚫 Not fixable - https://eslint.org/docs/rules/no-await-in-loop
*/
'no-await-in-loop': 'error',
},
};
6 changes: 0 additions & 6 deletions eslint/rules/possible-errors.js
@@ -1,11 +1,5 @@
module.exports = {
rules: {
/**
* Disallow await inside of loops.
*
* 🚫 Not fixable - https://eslint.org/docs/rules/no-await-in-loop
*/
'no-await-in-loop': 'error',
/**
* Disallow the use of console.
*
Expand Down

0 comments on commit 2275538

Please sign in to comment.