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.

Proposal for additional APIs

See original GitHub issue

I would like to propose additional APIs. I’m not sure which object they should be attached to, as they don’t seem to fit any of the current ones we have. Maybe linter, since they are all global.

version

Should return current ESLint version. This is necessary to correctly invalidate session storage data in the online demo, and probably useful for tools as well

getRules()

Should return all currently loaded rules. If CLIEngine.addPlugin has been called prior to this API call, it should also return rules from plugin. Return should be an array of object with rule name, rule schema and current configuration.

getRuleMetadata(null|string)

Should return metadata for all currently loaded rules (plugins included). Can be merged with getRules command.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:28 (26 by maintainers)

github_iconTop GitHub Comments

1reaction
ilyavolodincommented, Sep 29, 2016

TSC Summary: This is the proposal to add two new API methods:

  • version in both linter and CLIEngine objects. Would return current ESLint version
  • getRules in linter object. Would return an array of all rules currently loaded.
1reaction
nzakascommented, Aug 3, 2016

If we do, then we can have eslint:recommended be a dynamic JS file that iterates through rules and returns those with meta.recommended = true, so we would only need to update one location (per rule) to add them to eslint:recommended.

There’s nothing preventing us from doing that right now.

I think we only need version and getRules, since you can get metadata directly off of the rules.

Read more comments on GitHub >

github_iconTop Results From Across the Web

API Design, Proposal and Evaluation
API Design and Evaluation Considerations · There is no "recipe" for designing or evaluating an API. · An API is a clean, clear...
Read more >
API documentation proposal · WebPlatform Docs
Template and forms changes that need to be implemented; Priorities and project management; Additional documents. Current state of the WPD API documentation.
Read more >
Guide to building an enterprise API strategy | TechTarget
APIs enable enterprises to better deliver diverse data and services to internal and external customers, and open up new revenue streams.
Read more >
GSoC proposal: v2 API development - Public Lab
V2 API development and 3rd party app integrations. Abstract/summary. Further development of the RESTful API to migrate old legacy code to the new...
Read more >
API Improvement Proposals: Google's Take on the API Style ...
API Improvement Proposals, or AIPs, are documents outlining Google's guidelines for API design. Most AIPs focus on universal design standards — ...
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