Documentation comment not found for arrow function expression
reportWebVitals
1const reportWebVitals = onPerfEntry => { 2 if (onPerfEntry && onPerfEntry instanceof Function) {
3 import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 getCLS(onPerfEntry);
Documentation comment not found for arrow function expression
Header
1import React from "react";
2import HeaderStyle from "./HeaderStyle";
3
4const Header = () => { 5 return <HeaderStyle>Movie App</HeaderStyle>;
6};
7
Documentation comment not found for arrow function expression
Trending
2import context from "../../../store/context";
3import Carousel from "../../Carousel/Carousel";
4
5const Trending = ({}) => { 6 const { trendingApiData, trendingIsLoading, trender } = useContext(context);
7 // console.log("...trender", trender);
8 trendingApiData &&
Documentation comment not found for arrow function expression
Love
3import Carousel from "../../Carousel/Carousel";
4import SlickCarousel from "../../../SlickCarousel";
5
6const Love = ({}) => { 7 const { loveApiData, loveIsLoading } = useContext(context);
8 // console.log("...trender", trender);
9
Documentation comment not found for arrow function expression
Comedy
2import context from "../../../store/context";
3import Carousel from "../../Carousel/Carousel";
4
5const Comedy = ({}) => { 6 const { comedyApiData, comedyIsLoading, trender } = useContext(context);
7 // console.log("...trender", trender);
8 comedyApiData && console.log("...Trending apiData in Tending", comedyApiData);
Documentation comment not found for arrow function expression
Action
2import context from "../../../store/context";
3import Carousel from "../../Carousel/Carousel";
4
5const Action = ({}) => { 6 const { actionApiData, actionIsLoading, actioneer } = useContext(context);
7 // console.log("...trender", trender);
8
Documentation comment not found for arrow function expression
SlickCarousel
2import Slider from "react-slick";
3import { CarouselStyle } from "./components/Carousel/CarouselStyle";
4
5const SlickCarousel = ({ apiData }) => { 6 var settings = {
7 dots: true,
8 infinite: false,
Documentation comment not found for arrow function expression
App
7import "slick-carousel/slick/slick-theme.css";
8import SlickCarousel from "./SlickCarousel";
9
10const App = () => {11 return (
12 <>
13 <Header />
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;
}