From 04fec32d19b614a49af773087e332bfb7e2e09c2 Mon Sep 17 00:00:00 2001 From: Carlos Mesquita <52337966+carlos3g@users.noreply.github.com> Date: Fri, 17 Mar 2023 04:26:36 -0700 Subject: [PATCH] fix(eslint-plugin-specs): removes unnecessary `ENOENT` error check (#36448) Summary: ```javascript // workaround https://github.com/nodejs/node/issues/31481 // todo: remove the ENOENT error check when we drop node.js 13 support case 'ENOENT': case 'EACCES': ``` Well, there was a TODO comment asking to remove `ENOENT` error check when react native drop nodejs 13 support since nodejs 14 has fixed the bug that motivated this check. Now react native minimum nodejs version supported is nodejs 14, so this check is not needed anymore. ## Changelog [Internal] [Fixed] - Removes `ENOENT` error check Pull Request resolved: https://github.com/facebook/react-native/pull/36448 Reviewed By: NickGerleman Differential Revision: D44025087 Pulled By: cortinico fbshipit-source-id: f42cb7105a088e2eea207da12d4e63c6d26f3c77 --- packages/eslint-plugin-specs/with-babel-register/disk-cache.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/eslint-plugin-specs/with-babel-register/disk-cache.js b/packages/eslint-plugin-specs/with-babel-register/disk-cache.js index 9a797909cec8bf..c840036775271e 100644 --- a/packages/eslint-plugin-specs/with-babel-register/disk-cache.js +++ b/packages/eslint-plugin-specs/with-babel-register/disk-cache.js @@ -61,9 +61,6 @@ function save() { fs.writeFileSync(FILENAME, serialised); } catch (e) { switch (e.code) { - // workaround https://github.com/nodejs/node/issues/31481 - // todo: remove the ENOENT error check when we drop node.js 13 support - case 'ENOENT': case 'EACCES': case 'EPERM': console.warn(