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

Ability to set path to ESLint #1051

Closed
dead-claudia opened this issue Nov 7, 2017 · 3 comments
Closed

Ability to set path to ESLint #1051

dead-claudia opened this issue Nov 7, 2017 · 3 comments

Comments

@dead-claudia
Copy link

Issue Type

Feature Request

Issue Description

While working on ESLint itself, I found it was not possible to use this plugin without npm link && npm link eslint (circular symlink, which is bad). Instead, I'd like to be able to specify the path to ESLint directly, so I can still use this while developing on it.

The symptom I found that led me here is that it was complaining about a missing plugin with an unhelpful message.

(Note: this used to provide this functionality, but had since dropped it.)

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
Linter Eslint: Debug output here
@Arcanemagus
Copy link
Member

There already is the ability to specify a hardcoded path to eslint... as long as it ends with "eslint" that is.

} else if (Path.isAbsolute(cleanPath(config.advancedLocalNodeModules))) {
locationType = 'advanced specified'
eslintDir = Path.join(cleanPath(config.advancedLocalNodeModules), 'eslint')
} else {

If you specify an absolute path using the Advanced Local Node Modules setting then the path you give will be used directly, the only modification being eslint appended on the end.

The symptom I found that led me here is that it was complaining about a missing plugin with an unhelpful message.

The error message is coming straight from ESLint, the issue you linked is about replacing that with instructions on how to fix it 😉.

(Note: this used to provide this functionality, but had since dropped it.)

I'm not sure what you mean here?

@dead-claudia
Copy link
Author

dead-claudia commented Nov 8, 2017

So, should I specify advancedLocalNodeModules: '..'? Edit: Yep, that works! 😄

The error message is coming straight from ESLint, the issue you linked is about replacing that with instructions on how to fix it 😉.

I'm aware. I was linking a little too tangentially. Sorry about that.

I'm not sure what you mean here?

You used to, in previous versions of this plugin, request the path to eslint/lib/cli-engine.js rather than just eslint.

@Arcanemagus
Copy link
Member

Arcanemagus commented Nov 8, 2017

You used to, in previous versions of this plugin, request the path to eslint/lib/cli-engine.js rather than just eslint.

Ah! That was quite fragile and hacky, it was replaced with a less fragile but still somewhat hacky method used currently in #873. 😉

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

2 participants