Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 41b1f5f

Browse files
Merge pull request #2174 from umbraco/v14/chore/eslint-jsdocs
Chore: Lint JsDocs
2 parents 25952f1 + 055b94e commit 41b1f5f

File tree

419 files changed

+1160
-713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

419 files changed

+1160
-713
lines changed

eslint.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ import wcPlugin from 'eslint-plugin-wc';
66
import litPlugin from 'eslint-plugin-lit';
77
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
88
import tseslint from 'typescript-eslint';
9+
import jsdoc from 'eslint-plugin-jsdoc';
910

1011
export default [
1112
// Recommended config applied to all files
1213
js.configs.recommended,
1314
...tseslint.configs.recommended,
1415
wcPlugin.configs['flat/recommended'],
1516
litPlugin.configs['flat/recommended'],
17+
jsdoc.configs['flat/recommended'], // We use the non typescript version to allow types to be defined in the jsdoc comments. This will allow js docs as an alternative to typescript types.
1618
localRules.configs.all,
1719
eslintPluginPrettierRecommended,
1820

@@ -46,7 +48,7 @@ export default [
4648
},
4749
rules: {
4850
semi: ['warn', 'always'],
49-
"prettier/prettier": ["warn", { "endOfLine": "auto" }],
51+
'prettier/prettier': ['warn', { endOfLine: 'auto' }],
5052
'no-unused-vars': 'off', //Let '@typescript-eslint/no-unused-vars' catch the errors to allow unused function parameters (ex: in interfaces)
5153
'no-var': 'error',
5254
...importPlugin.configs.recommended.rules,

package-lock.json

Lines changed: 142 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@
247247
"eslint": "^9.7.0",
248248
"eslint-config-prettier": "^9.1.0",
249249
"eslint-plugin-import": "^2.29.1",
250+
"eslint-plugin-jsdoc": "^48.11.0",
250251
"eslint-plugin-lit": "^1.14.0",
251252
"eslint-plugin-local-rules": "^3.0.2",
252253
"eslint-plugin-prettier": "^5.1.3",

src/apps/app/app-auth.controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export class UmbAppAuthController extends UmbControllerBase {
6060
/**
6161
* Starts the authorization flow.
6262
* It will check which providers are available and either redirect directly to the provider or show a provider selection screen.
63+
* @param userLoginState
6364
*/
6465
async makeAuthorizationRequest(userLoginState: UmbUserLoginState = 'loggingIn'): Promise<boolean> {
6566
if (!this.#authContext) {

src/apps/app/app-error.element.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,27 @@ import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
1010
export class UmbAppErrorElement extends UmbLitElement {
1111
/**
1212
* The headline to display
13-
*
1413
* @attr
1514
*/
1615
@property()
1716
errorHeadline?: string | null;
1817

1918
/**
2019
* The error message to display
21-
*
2220
* @attr
2321
*/
2422
@property()
2523
errorMessage?: string | null;
2624

2725
/**
2826
* The error to display
29-
*
3027
* @attr
3128
*/
3229
@property()
3330
error?: unknown;
3431

3532
/**
3633
* Hide the back button
37-
*
3834
* @attr
3935
*/
4036
@property({ type: Boolean, attribute: 'hide-back-button' })

src/apps/app/app.element.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { hasOwnOpener, retrieveStoredPath } from '@umbraco-cms/backoffice/utils'
2525
export class UmbAppElement extends UmbLitElement {
2626
/**
2727
* The base URL of the configured Umbraco server.
28-
*
2928
* @attr
3029
* @remarks This is the base URL of the Umbraco server, not the base URL of the backoffice.
3130
*/
@@ -39,7 +38,6 @@ export class UmbAppElement extends UmbLitElement {
3938

4039
/**
4140
* The base path of the backoffice.
42-
*
4341
* @attr
4442
*/
4543
@property({ type: String })

src/apps/app/server-connection.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class UmbServerConnection {
2424

2525
/**
2626
* Gets the URL of the server.
27-
* @return {*}
27+
* @returns {*}
2828
* @memberof UmbServerConnection
2929
*/
3030
getUrl() {
@@ -33,7 +33,7 @@ export class UmbServerConnection {
3333

3434
/**
3535
* Gets the status of the server.
36-
* @return {string}
36+
* @returns {string}
3737
* @memberof UmbServerConnection
3838
*/
3939
getStatus() {
@@ -43,7 +43,7 @@ export class UmbServerConnection {
4343

4444
/**
4545
* Checks if the server is connected.
46-
* @return {boolean}
46+
* @returns {boolean}
4747
* @memberof UmbServerConnection
4848
*/
4949
getIsConnected() {

src/apps/installer/installer.context.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class UmbInstallerContext {
3838
/**
3939
* Observable method to get the current step in the installation process
4040
* @public
41-
* @return {*} {Observable<number>}
41+
* @returns {*} {Observable<number>}
4242
* @memberof UmbInstallerContext
4343
*/
4444
public currentStepChanges(): Observable<number> {
@@ -48,7 +48,7 @@ export class UmbInstallerContext {
4848
/**
4949
* Observable method to get the install status in the installation process
5050
* @public
51-
* @return {*} {(Observable<ProblemDetails | null>)}
51+
* @returns {*} {(Observable<ProblemDetails | null>)}
5252
* @memberof UmbInstallerContext
5353
*/
5454
public installStatusChanges(): Observable<ProblemDetails | null> {
@@ -96,7 +96,7 @@ export class UmbInstallerContext {
9696
/**
9797
* Get the data for the installation process
9898
* @public
99-
* @return {*} {PostInstallRequest}
99+
* @returns {*} {PostInstallRequest}
100100
* @memberof UmbInstallerContext
101101
*/
102102
public getData(): InstallRequestModel {

src/libs/class-api/class.interface.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface UmbClassInterface extends UmbControllerHost {
1313
* @description Observe an Observable. An Observable is a declared source of data that can be observed. An observables is declared from a UmbState.
1414
* @param {Observable<T>} source An Observable to observe from.
1515
* @param {method} callback Callback method called when data is changed.
16-
* @return {UmbObserverController} Reference to the created Observer Controller instance.
16+
* @returns {UmbObserverController} Reference to the created Observer Controller instance.
1717
* @memberof UmbClassMixin
1818
*/
1919
observe<
@@ -38,7 +38,7 @@ export interface UmbClassInterface extends UmbControllerHost {
3838
* @description Provide a context API for this or child elements.
3939
* @param {string} contextAlias
4040
* @param {instance} instance The API instance to be exposed.
41-
* @return {UmbContextProviderController} Reference to the created Context Provider Controller instance
41+
* @returns {UmbContextProviderController} Reference to the created Context Provider Controller instance
4242
* @memberof UmbClassMixin
4343
*/
4444
provideContext<R = unknown>(alias: string | UmbContextToken<R>, instance: R): UmbContextProviderController<R>;
@@ -47,7 +47,7 @@ export interface UmbClassInterface extends UmbControllerHost {
4747
* @description Setup a subscription for a context. The callback is called when the context is resolved.
4848
* @param {string} contextAlias
4949
* @param {method} callback Callback method called when context is resolved.
50-
* @return {UmbContextConsumerController} Reference to the created Context Consumer Controller instance
50+
* @returns {UmbContextConsumerController} Reference to the created Context Consumer Controller instance
5151
* @memberof UmbClassMixin
5252
*/
5353
consumeContext<BaseType = unknown, ResultType extends BaseType = BaseType>(
@@ -58,7 +58,7 @@ export interface UmbClassInterface extends UmbControllerHost {
5858
/**
5959
* @description Retrieve a context. Notice this is a one time retrieving of a context, meaning if you expect this to be up to date with reality you should instead use the consumeContext method.
6060
* @param {string} contextAlias
61-
* @return {Promise<ContextType>} A Promise with the reference to the Context Api Instance
61+
* @returns {Promise<ContextType>} A Promise with the reference to the Context Api Instance
6262
* @memberof UmbClassMixin
6363
*/
6464
getContext<BaseType = unknown, ResultType extends BaseType = BaseType>(

src/libs/context-api/consume/context-request.event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface UmbContextRequestEvent<ResultType = unknown> extends Event {
1818
/**
1919
* @export
2020
* @class UmbContextRequestEventImplementation
21-
* @extends {Event}
21+
* @augments {Event}
2222
* @implements {UmbContextRequestEvent}
2323
*/
2424
export class UmbContextRequestEventImplementation<ResultType = unknown>

0 commit comments

Comments
 (0)