Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 2aa0631

Browse files
committed
Properly dispose of the subscriptions
1 parent 6e08070 commit 2aa0631

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ import { CompositeDisposable } from 'atom';
55

66
const grammarScopes = [];
77

8+
let subscriptions;
9+
810
export function activate() {
911
require('atom-package-deps').install('linter-htmlhint');
1012

11-
const subscriptions = new CompositeDisposable();
13+
subscriptions = new CompositeDisposable();
1214
subscriptions.add(atom.config.observe('linter-htmlhint.enabledScopes', (scopes) => {
1315
// Remove any old scopes
1416
grammarScopes.splice(0, grammarScopes.length);
@@ -17,6 +19,10 @@ export function activate() {
1719
}));
1820
}
1921

22+
export function deactivate() {
23+
subscriptions.dispose();
24+
}
25+
2026
function getConfig(filePath) {
2127
const fs = require('fs');
2228
const path = require('path');

0 commit comments

Comments
 (0)