How to use the @hint/utils-telemetry.updateTelemetry function in @hint/utils-telemetry

To help you get started, we’ve selected a few @hint/utils-telemetry examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webhintio / hint / packages / extension-browser / src / devtools / utils / analytics.ts View on Github external
export const setup = (storage = localstore) => {
    const telemetry = storage.getItem(storageKey);

    if (!telemetry) {
        console.log('telemetry disabled');
        updateTelemetry(false);

        return;
    }

    console.log('telemetry enabled');
    updateTelemetry(true);
};
github webhintio / hint / packages / extension-browser / src / devtools / utils / analytics.ts View on Github external
export const setup = (storage = localstore) => {
    const telemetry = storage.getItem(storageKey);

    if (!telemetry) {
        console.log('telemetry disabled');
        updateTelemetry(false);

        return;
    }

    console.log('telemetry enabled');
    updateTelemetry(true);
};
github webhintio / hint / packages / extension-vscode / src / server.ts View on Github external
connection.onNotification(notifications.telemetryEnabledChanged, (telemetryEnabled: TelemetryState) => {
    updateTelemetry(telemetryEnabled === 'enabled');
    trackOptIn(telemetryEnabled, everEnabledTelemetry);
});