rhino icon indicating copy to clipboard operation
rhino copied to clipboard

Unable to Lint multiple JS files

Open vikram-rawat opened this issue 3 years ago • 0 comments

Steps to reproduce

  1. Create a Rhino project rhino::init()
  2. create more than 1 js files
  3. call Import statement on any of the file. (If you don't call import you wont get any error. Even if you call import with the wrong path name you don't get an error.) only with import statement you will get an error.
  4. Now try lint_js() from Rhino

What happened?

I get an error like

> rhino::lint_js()
yarn run v1.22.15
$ eslint root/app/js
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating

Oops! Something went wrong! :(

ESLint: 7.32.0

Error: EPERM: operation not permitted, scandir 'E:\Coding\R_code\github\delete_it\.rhino\node\root'
Occurred while linting E:\Coding\R_code\github\delete_it\.rhino\node\root\app\js\index.js:1
    at Object.readdirSync (node:fs:1405:3)
    at fileExistsWithCaseSync (E:\Coding\R_code\github\delete_it\.rhino\node\node_modules\eslint-module-utils\resolve.js:71:26)
    at fileExistsWithCaseSync (E:\Coding\R_code\github\delete_it\.rhino\node\node_modules\eslint-module-utils\resolve.js:75:16)
    at fileExistsWithCaseSync (E:\Coding\R_code\github\delete_it\.rhino\node\node_modules\eslint-module-utils\resolve.js:75:16)
    at checkSourceValue (E:\Coding\R_code\github\delete_it\.rhino\node\node_modules\eslint-plugin-import\lib\rules\no-unresolved.js:47:52)
    at checkSourceValue (E:\Coding\R_code\github\delete_it\.rhino\node\node_modules\eslint-module-utils\moduleVisitor.js:29:5)
    at checkSource (E:\Coding\R_code\github\delete_it\.rhino\node\node_modules\eslint-module-utils\moduleVisitor.js:34:5)
    at E:\Coding\R_code\github\delete_it\.rhino\node\node_modules\eslint\lib\linter\safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (E:\Coding\R_code\github\delete_it\.rhino\node\node_modules\eslint\lib\linter\safe-emitter.js:45:38)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error in `system_yarn()`:
! System command 'yarn' exited with status 2.
Run `rlang::last_error()` to see where the error occurred.

Expected behavior

It should give me lint errors

Rhino diagnostics

Windows 10 x64 build 17763 R version 4.2.1 (2022-06-23 ucrt) rhino: 1.1.0 node: v16.16.0 yarn: 1.22.15

Comments

This is going to be an issue for Windows user once they start to split their files. If they don't split their files then They will not get any error.

vikram-rawat avatar Sep 07 '22 13:09 vikram-rawat