Created by: ehsankhfr
Fix #9970 (closed) Fix #10161 (closed)
As mentioned in https://github.com/facebook/create-react-app/pull/9977#discussion_r515618643, likewise eslint-loader
, we need to support non-existing OR inaccessible path fallback for cache folder into os.tempdir
, as current(new) eslint plugin doesn't support the fallback.
TEST PLAN:
To test how permission issue folder fallback works:
- under the
node_module
- Remove the
.cache
folder content, if folder exists. - Or, create
.cache
folder
- Remove the
- run
chmod u=r--,g=r--,o=r-- node_modules/.cache
- run
npm start
-
ls node_modules/.cache
should not show the.eslintcache
file
To test how non-existent folder fallback works:
- under the
node_module
- Remove the
.cache
folder content, if folder exists
- Remove the
- run
npm start
-
ls node_modules/.cache
should not show the.eslintcache
file
To test how normal flow of caching works:
- under the
node_module
- Make sure the
.cache
folder exists - Make sure there is enough access to the folder
.cache
:chmod u=rwx,g=r-x,o=r-x node_modules/.cache
- Make sure the
- run
npm start
-
ls node_modules/.cache
should show the.eslintcache
file