question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`overrides` with processor works unexpectedly

See original GitHub issue

Tell us about your environment

  • ESLint Version: 7.21.0
  • Node Version: v14.16.0
  • npm Version: 7.5.6
  • Operating System: GNU/Linux 5.4.0-1024-gcp

What parser (default, @babel/eslint-parser, @typescript-eslint/parser, etc.) are you using?

Default

Please show your full configuration:

https://github.com/JounQin/test/blob/eslint/.eslintrc.js

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

https://github.com/JounQin/test/blob/eslint/test.cjs

yarn eslint test.cjs

What did you expect to happen?

No error because prettier is intended to be disabled

What actually happened? Please copy-paste the actual, raw output from ESLint.

Oops! Something went wrong! :(

ESLint: 7.21.0

Error: ENOTDIR: not a directory, stat '/workspace/test/test.cjs/0_.cjs'
Occurred while linting /workspace/test/test.cjs/0_.cjs:1
    at Object.statSync (fs.js:1086:3)
    at isTypeSync (/workspace/test/node_modules/prettier/third-party.js:9748:46)
    at getDirectorySync (/workspace/test/node_modules/prettier/third-party.js:9802:62)
    at ExplorerSync.searchSync (/workspace/test/node_modules/prettier/third-party.js:9950:66)
    at _resolveConfig (/workspace/test/node_modules/prettier/index.js:25592:50)
    at Function.resolveConfig.sync (/workspace/test/node_modules/prettier/index.js:25621:42)
    at Program (/workspace/test/node_modules/eslint-plugin-prettier/eslint-plugin-prettier.js:167:40)
    at /workspace/test/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/workspace/test/node_modules/eslint/lib/linter/safe-emitter.js:45:38)

Steps to reproduce this issue:

  1. clone https://github.com/JounQin/test/tree/eslint or open https://turquoise-limpet-v0as7arg.ws-us03.gitpod.io/
  2. run yarn eslint test.cjs, there will be an error
  3. toggle the comment in .eslintrc.js and run yarn eslint test.cjs again, there will be no error, but it is not expected, I want to check test.cjs with prettier but disable it on code block

Are you willing to submit a pull request to fix this bug?

I don’t know how to fix it easily.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
nzakascommented, Mar 26, 2021

I think this is a bug. We probably did this for performance reasons, since calculating configs is expensive.

I’m also guessing this use case is fairly uncommon so fixing this bug doesn’t seem like a breaking change to me.

1reaction
btmillscommented, Mar 27, 2021

I agree this is a bug that we can fix in a semver-minor change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unused Processor Symbol Overrides Utility
Endevor 's Unused Processor Symbol Overrides Utility, or BC1PSDEL, lets you list and remove unused processor symbol overrides.
Read more >
How to Fix High CPU Usage - Intel
1. Reboot. First step: save your work and restart your PC. “Turn it off and on again” is classic troubleshooting advice for a...
Read more >
gazelle:resolve in sibling directories can override each other · Issue ...
overrides is 4 while that of rc.overrides is 3. When a sibling dir2 creates another rcCopy.overrides , the backing array is still [a,...
Read more >
Unexpected behavior of wall Visibility Graphics overrides in ...
Issue: Users reported, that visibility-graphics overrides don´t work as expected in Revit views being set to structural discipline.
Read more >
java - Multithreading (ExecutorService) method works unexpectedly ...
You are assigning the same work (of searching in the entire array of strings) to all threads. Consequently, threads are overriding each other's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found