1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

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.
This commit is contained in:
Whymarrh Whitby 2020-08-12 22:09:17 -02:30 committed by GitHub
parent e8b31a77b9
commit 954df6e482
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

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

View File

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