Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Node.js API to receive config #4392

Open
hudochenkov opened this issue Oct 30, 2019 · 3 comments
Open

Expose Node.js API to receive config #4392

hudochenkov opened this issue Oct 30, 2019 · 3 comments
Labels
status: needs discussion triage needs further discussion

Comments

@hudochenkov
Copy link
Member

hudochenkov commented Oct 30, 2019

We have --print-config CLI flag to print config, but we don't have this functionality in Node.js API. Let's expose this functionality in the API.

Not sure about the name of this function. It can't be printConfig, because it's API it doesn't print anything. It can't be getConfigForFile, because we already have it.

(ref)

@hudochenkov hudochenkov added status: needs discussion triage needs further discussion type: enhancement a new feature that isn't related to rules labels Oct 30, 2019
@shawnbot
Copy link
Contributor

Some naming ideas:

  • loadConfig() seems like a suitable name, generally speaking.
  • resolveConfig() suggests that you'll be getting back a "resolved" config, which seems more specific than just a "loaded" one.
  • getAugmentedConfig() matches the internal function names, but probably wouldn't make much sense to people who aren't familiar with the internals.

@jeddy3 jeddy3 removed the type: enhancement a new feature that isn't related to rules label Jan 12, 2020
@Arcanemagus
Copy link
Contributor

What would this do that getConfigForFile doesn't already do? The linked issue doesn't appear to have anything to do with --print-config, so maybe I'm simply getting confused by that as an example.

@jeddy3
Copy link
Member

jeddy3 commented Jan 19, 2022

@hudochenkov Can this issue be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs discussion triage needs further discussion
Development

No branches or pull requests

4 participants