Skip to content

Commit 47420d7

Browse files
committed
Enable lint jsdoc/require-hyphen-before-param-description for readability
1 parent df4b565 commit 47420d7

File tree

19 files changed

+48
-45
lines changed

19 files changed

+48
-45
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module.exports = {
5555
// 'jsdoc/require-description-complete-sentence': 1,
5656
// 'jsdoc/require-example': 1,
5757
// 'jsdoc/require-file-overview': 1,
58-
// 'jsdoc/require-hyphen-before-param-description': 1,
58+
'jsdoc/require-hyphen-before-param-description': 1,
5959
'jsdoc/require-jsdoc': 1, // Recommended
6060
'jsdoc/require-param': 1, // Recommended
6161
'jsdoc/require-param-description': 1, // Recommended

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ dist-ssr
2626
pods*
2727

2828
lintPush.sh
29+
30+
cypress/screenshots

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"dev": "vite",
88
"build": "vite build",
99
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
10+
"lint:fix": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0 --fix",
1011
"preview": "vite preview",
1112
"test": "cypress run",
1213
"prepare:pods": "npm run prepare:pods:accounts && npm run prepare:pods:data",

src/authenticationProvider/authenticationProvider.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export default {
8787

8888
/**
8989
* Looks up the IDP of a WebID by querying the WebID .
90-
* @param {URL} webId the WebID to query the IDP from
90+
* @param {URL} webId - the WebID to query the IDP from
9191
* @returns {?Promise<URL>} the first IDP of the WebID or undefined if no IDP is found in the WebID document
9292
*/
9393
async function queryIDPfromWebId(webId) {
@@ -111,7 +111,7 @@ async function queryIDPfromWebId(webId) {
111111

112112
/**
113113
*
114-
* @param {object} webIdThing the webId (actually of type ProfileAll, but importing this throws an error https://github.com/SolidLabResearch/generic-data-viewer-react-admin/issues/15) document to get the name from
114+
* @param {object} webIdThing - the webId (actually of type ProfileAll, but importing this throws an error https://github.com/SolidLabResearch/generic-data-viewer-react-admin/issues/15) document to get the name from
115115
* @returns {?string} either the name or undefined if no foaf:name is found
116116
*/
117117
function getName(webIdThing) {
@@ -125,7 +125,7 @@ function getName(webIdThing) {
125125

126126
/**
127127
*
128-
* @param {object} webIdThing the webId (actually of type ProfileAll, but importing this throws an error https://github.com/SolidLabResearch/generic-data-viewer-react-admin/issues/15) document to get the profile picture from
128+
* @param {object} webIdThing - the webId (actually of type ProfileAll, but importing this throws an error https://github.com/SolidLabResearch/generic-data-viewer-react-admin/issues/15) document to get the profile picture from
129129
* @returns {?string} either a url to the profile picture or undefined if no foaf:img is found
130130
*/
131131
function getProfilePicture(webIdThing) {

src/components/ActionBar/SourceAuthenticationIcon/SourceAuthenticationIcon.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { Component } from "react";
88

99
/**
1010
*
11-
* @param {object} props the props passed to the component
12-
* @param {string} props.source the source to check
11+
* @param {object} props - the props passed to the component
12+
* @param {string} props.source - the source to check
1313
* @returns {Component} an icon indicating whether the source requires authentication or not (or if it is uncertain due to an error fetching the source)
1414
*/
1515
function SourceAuthenticationIcon({ source }) {
@@ -54,7 +54,7 @@ SourceAuthenticationIcon.propTypes = {
5454

5555
/**
5656
* Given a source, check if it requires authentication or not
57-
* @param {string} source the source to check
57+
* @param {string} source - the source to check
5858
* @returns {?boolean} whether the source requires authentication or not, or undefined if it is uncertain
5959
*/
6060
async function authenticationRequired(source) {

src/components/ActionBar/SourceFetchStatusIcon/SourceFetchStatusIcon.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import PropTypes from "prop-types";
55
import { Component } from "react";
66

77
/**
8-
* @param {object} props the props passed to the component
9-
* @param {object} props.context the query context
10-
* @param {string} props.source the source to check
11-
* @param {string} props.proxyUrl the proxy url to use if querying is used for sources
8+
* @param {object} props - the props passed to the component
9+
* @param {object} props.context - the query context
10+
* @param {string} props.source - the source to check
11+
* @param {string} props.proxyUrl - the proxy url to use if querying is used for sources
1212
* @returns {Component} an icon indicating whether the query was executed succesfully or not
1313
*/
1414
function SourceFetchStatusIcon({ context, source, proxyUrl }) {

src/components/ActionBar/Time.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import PropTypes from "prop-types";
22
import { Component } from "react";
33

44
/**
5-
* @param {object} props the props passed down to the component
5+
* @param {object} props - the props passed down to the component
66
* @returns {Component} a component that displays the time in seconds and milliseconds (if configured to do so)
77
*/
88
function Time(props) {

src/components/InteractionLayout/AuthenticationMenu/LogoutButton.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { Ref } from "react";
88

99
/**
1010
* A component that renders a logout button in the UserMenu in case the user is logged in or a login button in case the user isn't logged in.
11-
* @param {object} props The props passed into the component.
12-
* @param {Ref} ref The ref passed into the component.
11+
* @param {object} props - The props passed into the component.
12+
* @param {Ref} ref - The ref passed into the component.
1313
*/
1414
const LogoutButton = forwardRef((props, ref) => {
1515
const logout = useLogout();
@@ -18,7 +18,7 @@ const LogoutButton = forwardRef((props, ref) => {
1818

1919
/**
2020
* An EventListener that handles what should happen when the user is trying to log out by pressing the log out button.
21-
* @param {MouseEvent} event the event that triggered the EventListener
21+
* @param {MouseEvent} event - the event that triggered the EventListener
2222
*/
2323
function handleLogout(event) {
2424
event.preventDefault();

src/components/InteractionLayout/InteractionLayout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import SelectionMenu from "./SelectionMenu/SelectionMenu";
55

66
/**
77
*
8-
* @param {object} props the props passed down to the component
8+
* @param {object} props - the props passed down to the component
99
* @returns {Component} custom Layout as defined by react-admin
1010
*/
1111
function InteractionLayout(props) {

src/components/InteractionLayout/NavigationBar/NavigationBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Component } from "react";
66

77
/**
88
*
9-
* @param {object} props the props passed down to the component
9+
* @param {object} props - the props passed down to the component
1010
* @returns {Component} custom AppBar as defined by react-admin
1111
*/
1212
function NavigationBar(props) {

0 commit comments

Comments
 (0)