Skip to content

Commit a918bcd

Browse files
s-rigaudSamuel Rigaud
andauthored
Jsdoc: enable eslint rule valid-jsdoc.preferType (#30509)
Co-authored-by: Samuel Rigaud <[email protected]>
1 parent c398904 commit a918bcd

18 files changed

+44
-37
lines changed

.eslintrc.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,14 @@
7272
"requireReturnType": true,
7373
"requireParamDescription": false,
7474
"requireReturnDescription": false,
75-
"requireParamType": true
75+
"requireParamType": true,
76+
"preferType": {
77+
"Any": "any",
78+
"Boolean": "boolean",
79+
"Number": "number",
80+
"object": "Object",
81+
"String": "string"
82+
}
7683
}
7784
]
7885
}

editor/js/commands/AddScriptCommand.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class AddScriptCommand extends Command {
55
/**
66
* @param {Editor} editor
77
* @param {THREE.Object3D|null} [object=null]
8-
* @param {String} [script='']
8+
* @param {string} [script='']
99
* @constructor
1010
*/
1111
constructor( editor, object = null, script = '' ) {

editor/js/commands/RemoveScriptCommand.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class RemoveScriptCommand extends Command {
55
/**
66
* @param {Editor} editor
77
* @param {THREE.Object3D|null} [object=null]
8-
* @param {String} [script='']
8+
* @param {string} [script='']
99
* @constructor
1010
*/
1111
constructor( editor, object = null, script = '' ) {

editor/js/commands/SetColorCommand.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ class SetColorCommand extends Command {
55
/**
66
* @param {Editor} editor
77
* @param {THREE.Object3D|null} [object=null]
8-
* @param {String} attributeName
9-
* @param {Number|null} [newValue=null] Integer representing a hex color value
8+
* @param {string} attributeName
9+
* @param {?number} [newValue=null] Integer representing a hex color value
1010
* @constructor
1111
*/
1212
constructor( editor, object = null, attributeName = '', newValue = null ) {

editor/js/commands/SetGeometryValueCommand.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ class SetGeometryValueCommand extends Command {
55
/**
66
* @param {Editor} editor
77
* @param {THREE.Object3D|null} [object=null]
8-
* @param {String} [attributeName='']
9-
* @param {Number|String|Boolean|Object|null} [newValue=null]
8+
* @param {string} [attributeName='']
9+
* @param {number|string|boolean|Object|null} [newValue=null]
1010
* @constructor
1111
*/
1212
constructor( editor, object = null, attributeName = '', newValue = null ) {

editor/js/commands/SetMaterialColorCommand.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ class SetMaterialColorCommand extends Command {
55
/**
66
* @param {Editor} editor
77
* @param {THREE.Object3D|null} [object=null]
8-
* @param {String} attributeName
9-
* @param {Number|null} [newValue=null] Integer representing a hex color value
10-
* @param {Number} [materialSlot=-1]
8+
* @param {string} attributeName
9+
* @param {?number} [newValue=null] Integer representing a hex color value
10+
* @param {number} [materialSlot=-1]
1111
* @constructor
1212
*/
1313
constructor( editor, object = null, attributeName = '', newValue = null, materialSlot = - 1 ) {

editor/js/commands/SetMaterialCommand.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class SetMaterialCommand extends Command {
77
* @param {Editor} editor
88
* @param {THREE.Object3D|null} object
99
* @param {THREE.Material|null} newMaterial
10-
* @param {Number} [materialSlot=-1]
10+
* @param {number} [materialSlot=-1]
1111
* @constructor
1212
*/
1313
constructor( editor, object = null, newMaterial = null, materialSlot = - 1 ) {

editor/js/commands/SetMaterialMapCommand.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ class SetMaterialMapCommand extends Command {
66
/**
77
* @param {Editor} editor
88
* @param {THREE.Object3D|null} [object=null]
9-
* @param {String} [mapName='']
9+
* @param {string} [mapName='']
1010
* @param {THREE.Texture|null} [newMap=null]
11-
* @param {Number} [materialSlot=-1]
11+
* @param {number} [materialSlot=-1]
1212
* @constructor
1313
*/
1414
constructor( editor, object = null, mapName = '', newMap = null, materialSlot = - 1 ) {

editor/js/commands/SetMaterialRangeCommand.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ class SetMaterialRangeCommand extends Command {
55
/**
66
* @param {Editor} editor
77
* @param {THREE.Object3D|null} [object=null]
8-
* @param {String} [attributeName='']
9-
* @param {Number} [newMinValue=-Infinity]
10-
* @param {Number} [newMaxValue=Infinity]
11-
* @param {Number} [materialSlot=-1]
8+
* @param {string} [attributeName='']
9+
* @param {number} [newMinValue=-Infinity]
10+
* @param {number} [newMaxValue=Infinity]
11+
* @param {number} [materialSlot=-1]
1212
* @constructor
1313
*/
1414
constructor( editor, object = null, attributeName = '', newMinValue = - Infinity, newMaxValue = Infinity, materialSlot = - 1 ) {

editor/js/commands/SetMaterialValueCommand.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ class SetMaterialValueCommand extends Command {
55
/**
66
* @param {Editor} editor
77
* @param {THREE.Object3D|null} [object=null]
8-
* @param {String} [attributeName='']
9-
* @param {Number|String|Boolean|Object|null} [newValue=null]
10-
* @param {Number} [materialSlot=-1]
8+
* @param {string} [attributeName='']
9+
* @param {number|string|boolean|Object|null} [newValue=null]
10+
* @param {number} [materialSlot=-1]
1111
* @constructor
1212
*/
1313
constructor( editor, object = null, attributeName = '', newValue = null, materialSlot = - 1 ) {

0 commit comments

Comments
 (0)