Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
activate(_) {
// Initialize.
this.linter = new Linter();
this.autocompleter = new Autocompleter();
// Events subscribed to in atom's system can be easily cleaned up with a
// CompositeDisposable
this.subscriptions = new CompositeDisposable();
this.subscriptions.add(atom.project.onDidChangePaths((projectPaths) => {
this.setProjectPaths(projectPaths);
}));
this.setProjectPaths(atom.project.getPaths());
this.subscriptions.add(new TooltipManager(this.editorService));
}
;
activate(_: ViewState) {
// Initialize.
this.linter = new Linter();
this.autocompleter = new Autocompleter();
// Events subscribed to in atom's system can be easily cleaned up with a
// CompositeDisposable
this.subscriptions = new CompositeDisposable();
this.subscriptions.add(
atom.project.onDidChangePaths((projectPaths: string[]) => {
this.setProjectPaths(projectPaths);
}));
this.setProjectPaths(atom.project.getPaths());
this.subscriptions.add(new TooltipManager(this.editorService));
};
constructor(props) {
this.props = props;
etch.initialize(this);
this.element.addEventListener('focusin', this.rememberLastFocus);
this.subscriptions = new CompositeDisposable(
this.props.commandRegistry.add(this.element, {
'tool-panel:unfocus': this.blur,
'core:focus-next': this.advanceFocus,
'core:focus-previous': this.retreatFocus,
}),
new Disposable(() => this.element.removeEventListener('focusin', this.rememberLastFocus)),
);
}
function on() {
subscriptions = new CompositeDisposable();
subscriptions.add(atom.config.observe('linter-markdown.presetRecommendedWithoutConfig', (value) => {
presetRecommendedWithoutConfig = value;
}));
subscriptions.add(atom.config.observe('linter-markdown.presetConsistentWithoutConfig', (value) => {
presetConsistentWithoutConfig = value;
}));
}
activate() {
this.subscriptions = new CompositeDisposable();
this.subscriptions.add(
atom.packages.onDidActivateInitialPackages(function() {
if (!atom.inSpecMode()) {
require('atom-package-deps').install('atom-ternjs', true);
}
})
);
manager.activate();
}