|
Last change
on this file was
48650,
checked in by whyisjake, 5 years ago
|
|
Build/Test Tools: Enable JSDocs to be linted with ESLint.
As part of the [Javascript Inline Docs Initiative](https://make.wordpress.org/core/handbook/docs/inline/js/) this add some tooling to lint Javascript docblocks. Two new commands:
npm run lint:jsdoc
npm run lint:jsdoc:fix
The latter will run the linter and try to fix an possible issues automatically.
Fixes #43828.
Props netweb, atimmer, kamataryo, whyisjake.
|
-
Property svn:eol-style set to
native
|
|
File size:
546 bytes
|
| Line | |
|---|
| 1 | module.exports = { |
|---|
| 2 | rules: { |
|---|
| 3 | 'require-jsdoc': 'off', |
|---|
| 4 | 'valid-jsdoc': [ 'error', { |
|---|
| 5 | prefer: { |
|---|
| 6 | arg: 'param', |
|---|
| 7 | argument: 'param', |
|---|
| 8 | extends: 'augments', |
|---|
| 9 | returns: 'return', |
|---|
| 10 | }, |
|---|
| 11 | preferType: { |
|---|
| 12 | array: 'Array', |
|---|
| 13 | bool: 'boolean', |
|---|
| 14 | Boolean: 'boolean', |
|---|
| 15 | float: 'number', |
|---|
| 16 | Float: 'number', |
|---|
| 17 | int: 'number', |
|---|
| 18 | integer: 'number', |
|---|
| 19 | Integer: 'number', |
|---|
| 20 | Number: 'number', |
|---|
| 21 | object: 'Object', |
|---|
| 22 | String: 'string', |
|---|
| 23 | Void: 'void', |
|---|
| 24 | }, |
|---|
| 25 | requireParamDescription: false, |
|---|
| 26 | requireReturn: false, |
|---|
| 27 | } ], |
|---|
| 28 | }, |
|---|
| 29 | }; |
|---|
Note: See
TracBrowser
for help on using the repository browser.