Fix no-constant-condition issues (#9210)

See [`no-constant-condition`](https://eslint.org/docs/rules/no-constant-condition) for more information.

This change enables `no-constant-condition` and fixes the issues raised by the rule.
feature/default_network_editable
Whymarrh Whitby 4 years ago committed by GitHub
parent e8b31a77b9
commit 954df6e482
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .eslintrc.js
  2. 2
      test/e2e/benchmark.js

@ -49,6 +49,7 @@ module.exports = {
'guard-for-in': 'error', 'guard-for-in': 'error',
'implicit-arrow-linebreak': 'error', 'implicit-arrow-linebreak': 'error',
'no-case-declarations': 'error', 'no-case-declarations': 'error',
'no-constant-condition': 'error',
'no-dupe-else-if': 'error', 'no-dupe-else-if': 'error',
'no-empty': 'error', 'no-empty': 'error',
'no-eq-null': 'error', 'no-eq-null': 'error',

@ -92,7 +92,7 @@ async function isWritable (directory) {
} }
async function getFirstParentDirectoryThatExists (directory) { async function getFirstParentDirectoryThatExists (directory) {
while (true) { for (;;) {
try { try {
await fs.access(directory, fsConstants.F_OK) await fs.access(directory, fsConstants.F_OK)
return directory return directory

Loading…
Cancel
Save