Make WordPress Core

Opened 2 months ago

Last modified 2 months ago

#43828 assigned task (blessed)

Add JSDoc ESLint script

Reported by: netweb Owned by: netweb
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch needs-testing
Focuses: javascript Cc:


This script seeks to add a JSDoc focused ESLint script to check the JSDocs conformity with the WordPress JavaScript Docs Coding Standards

It will also greatly aid those involved with the JavaScript Inline Docs Initiative to ensure patches are conforming to the coding standards.

To test and use this npm script run, npm install and then npm run lint:jsdoc in the terminal console.

A sister pull request add similar functionality has been in ongoing development in the Gutenberg repo:

The patch for this ticket adds the ESLint JSDoc configuration to a file named .eslintrc-jsdoc.js, this is to avoid conflicts with the work in progress of adding ESLint in #31823

Attachments (1)

43828.diff (2.2 KB) - added by netweb 2 months ago.

Download all attachments as: .zip

Change History (3)

2 months ago

#1 @atimmer
2 months ago

  • Keywords has-patch added

This would help a a lot when reviewing patches.

I am thinking, how hard would it be to add a check for the presence of @since?

#2 @netweb
2 months ago

  • Keywords needs-testing added

This patch will need a little more testing to ensure I've excluded, and not errantly omitted any files or folders that we should be checking.

Great idea for @since, I'll take a look around and see what options are available to check that it exists and ensure that it is valid syntax

Note: See TracTickets for help on using tickets.