6import { printConstructor } from "./print_constructor";
7import { PRINT_COMMANDS, DOCUMENT_COMMANDS } from "./statements";
8import { getConfig } from "./config";
9import { config } from "process";10
11export async function executeCommand(
12 statement: string
58
59export function activate(context: vscode.ExtensionContext): void {
60 // Print Commands
61 for (const [key, statement] of Object.entries(PRINT_COMMANDS)) {62 context.subscriptions.push(
63 vscode.commands.registerCommand(statement.command, () => {
64 executeCommand(statement.statement);
Unused variables are generally considered a code smell and should be avoided.
Removing unused references - It prevents unused modules from being loaded at runtime, improving performance, and preventing the compiler from loading metadata that will never be used. - It prevents conflicts that may occur when trying to reference another variable.
NOTE: If you have intentionally left a variable unused, we suggest you to prefix the variable name with a _
to prevent them from being flagged by DeepSource.
import fs from 'fs' // <- unused
import { readFileSync } from 'fs'
const text = readFileSync('declaration_of_independence.txt', 'utf-8')
console.log(text)
import { readFileSync } from 'fs'
const text = readFileSync('declaration_of_independence.txt', 'utf-8')
console.log(text)