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.

New Feature Proposal - Auto-Gen Todo List

See original GitHub issue

Right now there isnā€™t (to my knowledge, please correct me if Iā€™m wrong šŸ˜€ ) the capability for ESLint to suppress the current violations so existing code bases can adopt ESLint with CI without having to fix their existing files first.

Iā€™d like to change that, using Rubocopā€™s auto-generated configuration as inspiration. Iā€™ve already developed a proof of concept solution that:

  • Generates a .eslintrc-todo.yml based on the currently reported violations, and disables those rules for the affected files:
overrides:
  -
    rules:
      class-methods-use-this: 0
    # Note that files are excluded on a per-rule basis.
    files:
      - src/ZhuLi/DoTheThing.js
      - src/ZhuLi/DoTheOtherThing.js
  • Adds the new .eslintrc-todo.yml entry to the extends entry and recreates the .eslintrc.yml file.

Proposed Solution

Iā€™m planning to:

  • Leverage the solution above and add support for updating the other configuration file types (with the exception of .eslintrc.js, not sure how Iā€™d update a JS file).
  • Wire the solution to the CLI and add a --create-todo option.
  • Exclude the todo list config file when re-running with --create-todo.

Questions

  1. Would a PR for this feature be accepted?
  2. Are there any issues with the high-level approach Iā€™ve outlined?
  3. Are there any areas I should pay close attention to as Iā€™m building this?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
richsevioracommented, Oct 3, 2018

@ndushay Iā€™ve created eslint-takeoff as an alternative if/until this capability is added to ESLint itself. PRs, suggestions, bug reports are welcome šŸ˜„

1reaction
richsevioracommented, Jan 15, 2018

Iā€™m familiar with ā€œprobably overthinkingā€ things too. šŸ¤£

The workflow Iā€™ve found works best is almost what you described, the only difference is that I drop the overrides for that file first and then fix them. Lets me take advantage of IDE integration instead of having to drop back out to CLI to check as necessary.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Write the Best Project Proposal (With Templates)
Learn how to write a project proposal for your client and use these helpful templates to get you started even faster.
Read more >
Automatically fill in strong passwords on iPhone - Apple Support
Create a strong password for a new account Ā· On the new account screen for the website or app, enter a new account...
Read more >
Introducing C# Source Generators - .NET Blog
We're pleased to introduce the first preview of Source Generators, a new C# compiler feature that lets C# developers inspect user code andĀ ......
Read more >
Request for Discussion: Setup closures - Discussion - Swift Forums
We obviously need to begin with the language feature so that is where I'm focusing right now. I plan to write a first...
Read more >
Autogeneration of Database Applications from XML Metadata for ...
Request PDF | Autogeneration of Database Applications from XML Metadata for ... are engaged in adding new features to database management systems (DBMSs)....
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