1import * as fs from "fs";
2import * as os from "os";
3import * as path from "path";
4import * as vscode from "vscode"; 5
6export const nukeDir = path.join(os.homedir(), ".nuke");
7export const nukeToolsDir = path.join(nukeDir, "NukeTools");
1import * as fs from "fs";
2import * as os from "os";
3import * as path from "path"; 4import * as vscode from "vscode";
5
6export const nukeDir = path.join(os.homedir(), ".nuke");
1import * as fs from "fs";
2import * as os from "os"; 3import * as path from "path";
4import * as vscode from "vscode";
5
1import * as fs from "fs"; 2import * as os from "os";
3import * as path from "path";
4import * as vscode from "vscode";
1import * as vscode from "vscode";
2import * as path from "path"; 3import { readFileSync, createWriteStream } from "fs";
4
5export const root = path.resolve(__dirname, "../../../");
Wildcard imports are easier to write, but make it harder to pick out the specific functions or objects from a dependency that are used in a file.
import * from 'module';
// there is no clear way to tell if
// `someFunction` has been imported
// from 'module'.
someFunction();
Therefore, it is recommended to explicit imports wherever possible.
NOTE: Some libraries do not expose themselves as ESModules. In cases like these, it is recommended to use a skipcq comment to suppress this issue.
import * as axios from 'axios'
import * as Sentry from '@sentry/node'
try {
const result = await axios.get();
// ...
} catch (err) {
Sentry.captureException(err);
}
import axios from 'axios'
// skipcq: JS-C1003 - sentry does not expose itself as an ES Module.
import * as Sentry from '@sentry/node'
try {
const result = await axios.get();
// ...
} catch (err) {
Sentry.captureException(err);
}