Documentation comment not found for arrow function
handleBulkMail
62 }
63 };
64
65 const handleBulkMail = async (type: EmailType) => { 66 if (data !== null) {
67 const users = data?.data.users as ManagedUser[];
68 if (type === 'reminder') {
Documentation comment not found for arrow function
handleMail
31 const reminderURL = '/api/email/reminder/';
32 const approvedURL = '/api/email/approved/';
33
34 const handleMail = async ( 35 firstName: string,
36 email: string,
37 type: EmailType,
Documentation comment not found for function declaration
Internal
10import type { EmailType } from '../stream/types';
11import { PrimaryButton } from '@/lib/Buttons.lib';
12
13export default function Internal() { 14 const { admin } = useAdmin();
15 const { token } = useAuth();
16 const [queryParams] = useSearchParams();
Description
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"]
Bad Practice
function sum(a, b) {
return a + b;
}
Recommended
/**
* 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;
}