-
-
Notifications
You must be signed in to change notification settings - Fork 163
Closed
Labels
Description
Expected behavior
Linting should work with the new Node.js --permission
flag enabled.
Actual behavior
Coming over from eslint/eslint#19647, once the bug in ESLint around deleting the cache is fixed, jsdoc/check-values
crashes with:
Error: Access to this API has been restricted
Occurred while linting /Users/josh/repos/eslint/lib/config/flat-config-helpers.js:6
Rule: "jsdoc/check-values"
at new Worker (node:internal/worker:215:21)
at startWorkerThread (/Users/josh/repos/eslint/node_modules/synckit/lib/index.cjs:319:18)
at createSyncFn (/Users/josh/repos/eslint/node_modules/synckit/lib/index.cjs:89:18)
at /Users/josh/repos/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkValues.cjs:101:52
at utils.forEachPreferredTag (/Users/josh/repos/eslint/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.cjs:1491:7)
at exports.default.iterateAllJsdocs (/Users/josh/repos/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkValues.cjs:93:11)
at iterate (/Users/josh/repos/eslint/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.cjs:1744:3)
at callIterator (/Users/josh/repos/eslint/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.cjs:1883:7)
at Program:exit (/Users/josh/repos/eslint/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.cjs:1949:11)
at ruleErrorHandler (/Users/josh/repos/eslint/lib/linter/linter.js:1311:33)
ESLint Config
Sorry, I don't have a minimum repro right now - but the steps in eslint/eslint#19647 do work.
git clone https://github.com/eslint/eslint
cd eslint
npm i
# comment out the fs.unlink in lib/eslint/eslint.js
node --permission --allow-fs-read '*' bin/eslint
## ESLint sample
n/a
## Environment
- Node version: 23.9.0
- ESLint version 9.25.1
- `eslint-plugin-jsdoc` version: both 48.2.3 and 50.6.9
regseb