DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,864 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Stefan Breitenstein
Stefan Breitenstein

Posted on

Check if a Github ticket is closed with eslint

I see often code like this:

// workaround for https://github.com/vuetifyjs/vuetify/issues/6633

/**
  workaround code for the issue.
**/
Enter fullscreen mode Exit fullscreen mode

but even if the issue is fixed, the workaround remains.

To improve the tracking of closed issues and workaround code in the code based I wrote a small eslint plugin.

https://www.npmjs.com/package/eslint-plugin-gh-issue

So when you a have workaround code like the example above, you rewrite it like this:

// workaround for gh-issue vuetifyjs/vuetify/issues/6633
/**
  workaround code for the issue.
**/
Enter fullscreen mode Exit fullscreen mode

If the issue is closed, eslint will produce a warning and you know that maybe some action can be taken to remove the workaround code.

The plugin itself will not call github api itself. Instead it will call a cloudflare worker, which requests and caches the issues state.

Otherwise I was running in some quota issues by github.

How do you deal with (outdated) workaround code?

Top comments (0)

Take a look at this:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. πŸ›