Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

ESlint not showing any errors/warnings #1198

Closed
seve opened this issue Nov 12, 2018 · 7 comments
Closed

ESlint not showing any errors/warnings #1198

seve opened this issue Nov 12, 2018 · 7 comments

Comments

@seve
Copy link

seve commented Nov 12, 2018

Issue Type

Bug

Issue Description

I have ESlint working via CLI, I have ESlint installed globally alongside a global config. But when I try and use the atom package, nothing is happening.

Bug Checklist

  • [ ✔️] Restart Atom
  • [ ✔️] Verify the eslint CLI gives the proper result, while linter-eslint does not
  • [ ✔️] Paste the output of the Linter Eslint: Debug command from the Command Palette below
TypeError: Path must be a string. Received undefined

In developer panel console:

Uncaught (in promise) TypeError: Cannot read property 'atomVersion' of undefined
    at Object.generateDebugString (/Users/severiano/.atom/packages/linter-eslint/src/helpers.js:146:28)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
@IanVS
Copy link
Member

IanVS commented Nov 12, 2018

Are you working inside a project that has a package.json file?

@seve
Copy link
Author

seve commented Nov 12, 2018

@IanVS No I'm not

@IanVS
Copy link
Member

IanVS commented Nov 12, 2018

Interesting. I bet this line is failing, in that case:

linterEslintMeta = require(join(packagePath, 'package.json'))

We should add some safety around that. Nevertheless, that's just preventing you from running the debug command, it shouldn't prevent linting altogether.

Can you share your linter-eslint settings? Have you enabled the Use global option?

@seve
Copy link
Author

seve commented Nov 12, 2018

@IanVS I just tried a project with a package.json file and its not linting aswell. Here are my settings, you can see that Use global is enabled

screen shot 2018-11-12 at 1 25 59 pm

@IanVS
Copy link
Member

IanVS commented Nov 12, 2018

Ah hah, you have the option to Disable when no ESLint config is found. Currently, that does not consider the home directory (where I assume you have your global config defined). #1068 will change that behavior, but that has not been merged/released yet.

In the meantime, try disabling that setting and see if it works better.

@skylize
Copy link
Contributor

skylize commented Nov 12, 2018

Also, if I remember correctly, .eslintrc Path should point to a file, not a directory.

@seve
Copy link
Author

seve commented Nov 13, 2018

All working now! Looks like it was both what @IanVS and @skylize said. Thanks!

@seve seve closed this as completed Nov 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants