welcome
2import format from "kleur";
3import { constants } from "../constants/index";
4
5export const welcome = async (data: string) => { 6 if (!data || !data.length) {
7 data = constants.CLI_TITLE;
8 }
language
4const locale = Intl.DateTimeFormat().resolvedOptions().locale.slice(0, 2);
5let constants;
6
7async function language(data: string) { 8 {
9 if (data === "en") {
10 console.log("en", data);
handleVerify
1import verify from "@sebastienrousseau/crypto-lib/dist/lib/verify";
2import prompts from "prompts";
3
4const handleVerify = async () => { 5 const responseVerify = await prompts([
6 {
7 type: "text",
handleHelp
4
5language(locale);
6
7const handleHelp = async () => { 8 const responseHelp = await prompts([
9 {
10 type: "select",
88 return generate;
89}
90
91export async function reformat(data: dataReformat) { 92 const reformat = await key.reformat.default(data);
93 return reformat;
94}
It is recommended to have documentation comments above, or right inside a function/class declaration. This helps developers, users and even the author understand the purpose of a code snippet or API function in the future.
NOTE: If you want to stop this issue from getting raised on certain constructs (arrow functions, class expressions, methods etc.), consider using the skipdoccoverage option under the analyzers.meta
property in your .deepsource.toml
file.
For example, the following configuration will silence this issue for class expressions and method definitions:
[analyzers.meta]
skip_doc_coverage = ["class-expression", "method-definition"]
function sum(a, b) {
return a + b;
}
/**
* Function to add two numbers
* @param a The first number to add
* @param b The second number to add
* @returns The sum of two numbers
*/
function sum(a, b) {
return a + b;
}