Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Lint with Standard #383

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Lint with Standard #383

wants to merge 2 commits into from

Conversation

winstliu
Copy link
Contributor

@winstliu winstliu commented Mar 1, 2019

👕👕👕

Winston Liu added 2 commits March 1, 2019 16:05
@@ -11,8 +11,10 @@ module.exports = {

const editorElement = atom.views.getView(editor)
const matchManager = new MatchManager(editor, editorElement)
/* eslint-disable no-new */

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we don't care about those objects? Shouldn't they be tracked?

From what I'm seeing both of those create subscriptions so they will stick around until Atom closes if we aren't tracking them.

Copy link
Contributor Author

@winstliu winstliu Mar 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like it, as we do track them within the classes and dispose them when each editor is closed. We should, however, also delete them when bracket-matcher is deactivated.

I think that might be outside of the scope of this pull request. What I can do is fix that first in a separate PR and then merge this one.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to make a PR a while ago to cleanly deactivate, but didn't want to get into the WeakSet stuff. It wasn't until recently I realised we could just iterate all current editors instead of trying to track what's in a WeakSet (I didn't want to convert to a normal set because I didn't know why a weak one was used in the first place).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I could take a stab at it and see how much progress I can make :).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants