Piotrek Koszuliński преди 9 години
родител
ревизия
f8fc634956

+ 4 - 4
packages/ckeditor5-utils/src/collection.js

@@ -74,7 +74,7 @@ export default class Collection {
 	 * @param {Object} item
 	 * @param {Number} [index] The position of the item in the collection. The item
 	 * is pushed to the collection when `index` not specified.
-	 * @fires {@link core.Collection.add add}
+	 * @fires core.Collection#add
 	 */
 	add( item, index ) {
 		let itemId;
@@ -156,7 +156,7 @@ export default class Collection {
 	 *
 	 * @param {Object|Number|String} subject The item to remove, its id or index in the collection.
 	 * @returns {Object} The removed item.
-	 * @fires {@link core.Collection.remove remove}
+	 * @fires core.Collection#remove
 	 */
 	remove( subject ) {
 		let index, id, item;
@@ -270,13 +270,13 @@ utils.mix( Collection, EmitterMixin );
 /**
  * Fired when an item is added to the collection.
  *
- * @event core.Collection.add
+ * @event core.Collection#add
  * @param {Object} item The added item.
  */
 
 /**
  * Fired when an item is removed from the collection.
  *
- * @event core.Collection.remove
+ * @event core.Collection#remove
  * @param {Object} item The removed item.
  */

+ 1 - 1
packages/ckeditor5-utils/src/locale.js

@@ -40,7 +40,7 @@ export default class Locale {
 		 *		const t = this.t;
 		 *		t( 'Label' );
 		 *
-		 * @method t
+		 * @method core.Locale#t
 		 * @param {String} str The string to translate.
 		 * @param {String[]} values Values that should be used to interpolate the string.
 		 */

+ 10 - 8
packages/ckeditor5-utils/src/log.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-/* globals console */
+/* global console */
 
 'use strict';
 
@@ -15,19 +15,21 @@
  * code size of a minified CKEditor package. During minification process the messages will be shortened and
  * links to their documentation will be logged to the console.
  *
- * All errors and warning should be documented in the following way (note that block comment should be used instead of `//`):
+ * All errors and warning should be documented in the following way:
  *
- *		// Error thrown when a plugin cannot be loaded due to JavaScript errors, lack of plugins with a given name, etc.
- *		//
- *		// @error plugin-load
- *		// @param pluginName The name of the plugin that could not be loaded.
- *		// @param moduleName The name of the module which tried to load this plugin.
+ *		/**
+ *		 * Error thrown when a plugin cannot be loaded due to JavaScript errors, lack of plugins with a given name, etc.
+ *		 *
+ *		 * @error plugin-load
+ *		 * @param pluginName The name of the plugin that could not be loaded.
+ *		 * @param moduleName The name of the module which tried to load this plugin.
+ *		 * /
  *		log.error( 'plugin-load: It was not possible to load the "{$pluginName}" plugin in module "{$moduleName}', {
  *			pluginName: 'foo',
  *			moduleName: 'bar'
  *		} );
  *
- * ## Warning vs Error vs Throw
+ * ### Warning vs Error vs Throw
  *
  * * Whenever a potentially incorrect situation occurs, which does not directly lead to an incorrect behavior,
  * log a warning.

+ 2 - 2
packages/ckeditor5-utils/src/observablemixin.js

@@ -638,7 +638,7 @@ extend( ObservableMixin, EmitterMixin );
 /**
  * Fired when an attribute changed value.
  *
- * @event change
+ * @event core.ObservableMixin#change
  * @param {String} name The attribute name.
  * @param {*} value The new attribute value.
  * @param {*} oldValue The previous attribute value.
@@ -647,7 +647,7 @@ extend( ObservableMixin, EmitterMixin );
 /**
  * Fired when an specific attribute changed value.
  *
- * @event change:{attribute}
+ * @event core.ObservableMixin#change:{attribute}
  * @param {*} value The new attribute value.
  * @param {*} oldValue The previous attribute value.
  */

+ 7 - 7
packages/ckeditor5-utils/src/utils.js

@@ -16,7 +16,7 @@ const utils = {
 	 *
 	 * The following are the present features:
 	 *
-	 *  * spy.called: property set to `true` if the function has been called at least once.
+	 * * spy.called: property set to `true` if the function has been called at least once.
 	 *
 	 * @memberOf core.utils
 	 * @returns {Function} The spy function.
@@ -60,11 +60,11 @@ const utils = {
 	 * a flag specifying the relation is returned. Flags are negative numbers, so whenever a number >= 0 is returned
 	 * it means that arrays differ.
 	 *
-	 *   compareArrays( [ 0, 2 ], [ 0, 2 ] ); // 'SAME'
-	 *   compareArrays( [ 0, 2 ], [ 0, 2, 1 ] ); // 'PREFIX'
-	 *   compareArrays( [ 0, 2 ], [ 0 ] ); // 'EXTENSION'
-	 *   compareArrays( [ 0, 2 ], [ 1, 2 ] ); // 0
-	 *   compareArrays( [ 0, 2 ], [ 0, 1 ] ); // 1
+	 *		compareArrays( [ 0, 2 ], [ 0, 2 ] );		// 'SAME'
+	 *		compareArrays( [ 0, 2 ], [ 0, 2, 1 ] );		// 'PREFIX'
+	 *		compareArrays( [ 0, 2 ], [ 0 ] );			// 'EXTENSION'
+	 *		compareArrays( [ 0, 2 ], [ 1, 2 ] );		// 0
+	 *		compareArrays( [ 0, 2 ], [ 0, 1 ] );		// 1
 	 *
 	 * @memberOf core.utils
 	 * @param {Array} a Array that is compared.
@@ -218,7 +218,7 @@ const utils = {
 
 /**
  * An index at which arrays differ. If arrays are same at all indexes, it represents how arrays are related.
- * In this case, possible values are: 'SAME', 'PREFIX' or 'EXTENSION'.
+ * In this case, possible values are: `'SAME'`, `'PREFIX'` or `'EXTENSION'`.
  *
  * @memberOf core.utils
  * @typedef {String|Number} ArrayRelation