diff --git a/.eslintrc.json b/.eslintrc.json index f2babc118..8c94d1128 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -22,8 +22,8 @@ "String": "string", "Number": "number", "Boolean": "boolean", - "Function": "function", "object": "Object", + "function": "Function", "array": "Array", "date": "Date", "error": "Error" diff --git a/src/client/Client.js b/src/client/Client.js index b33fb2ab3..293af9d24 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -337,7 +337,7 @@ class Client extends EventEmitter { /** * Sets a timeout that will be automatically cancelled if the client is destroyed. - * @param {function} fn Function to execute + * @param {Function} fn Function to execute * @param {number} delay Time to wait before executing (in milliseconds) * @param {args} args Arguments for the function (infinite/rest argument, not an array) * @returns {Timeout} @@ -362,7 +362,7 @@ class Client extends EventEmitter { /** * Sets an interval that will be automatically cancelled if the client is destroyed. - * @param {function} fn Function to execute + * @param {Function} fn Function to execute * @param {number} delay Time to wait before executing (in milliseconds) * @param {args} args Arguments for the function (infinite/rest argument, not an array) * @returns {Timeout} diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 11c5aba54..2d1ae7ef1 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -22,8 +22,8 @@ class ClientManager { /** * Connects the Client to the WebSocket * @param {string} token The authorization token - * @param {function} resolve Function to run when connection is successful - * @param {function} reject Function to run when connection fails + * @param {Function} resolve Function to run when connection is successful + * @param {Function} reject Function to run when connection fails */ connectToWebSocket(token, resolve, reject) { this.client.emit(Constants.Events.DEBUG, `Authenticated using token ${token}`); diff --git a/src/util/Collection.js b/src/util/Collection.js index b031f896c..cd1226d21 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -127,7 +127,7 @@ class Collection extends Map { * [Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find). * Do not use this to obtain an item by its ID. Instead, use `collection.get(id)`. See * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get) for details. - * @param {string|function} propOrFn The property to test against, or the function to test with + * @param {string|Function} propOrFn The property to test against, or the function to test with * @param {*} [value] The expected value - only applicable and required if using a property for the first argument * @returns {*} * @example @@ -203,7 +203,7 @@ class Collection extends Map { * Identical to * [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), * but returns a Collection instead of an Array. - * @param {function} fn Function used to test (should return a boolean) + * @param {Function} fn Function used to test (should return a boolean) * @param {Object} [thisArg] Value to use as `this` when executing function * @returns {Collection} */ @@ -219,7 +219,7 @@ class Collection extends Map { /** * Identical to * [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter). - * @param {function} fn Function used to test (should return a boolean) + * @param {Function} fn Function used to test (should return a boolean) * @param {Object} [thisArg] Value to use as `this` when executing function * @returns {Collection} */ @@ -235,7 +235,7 @@ class Collection extends Map { /** * Identical to * [Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map). - * @param {function} fn Function that produces an element of the new array, taking three arguments + * @param {Function} fn Function that produces an element of the new array, taking three arguments * @param {*} [thisArg] Value to use as `this` when executing function * @returns {Array} */ @@ -250,7 +250,7 @@ class Collection extends Map { /** * Identical to * [Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some). - * @param {function} fn Function used to test (should return a boolean) + * @param {Function} fn Function used to test (should return a boolean) * @param {Object} [thisArg] Value to use as `this` when executing function * @returns {boolean} */ @@ -265,7 +265,7 @@ class Collection extends Map { /** * Identical to * [Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every). - * @param {function} fn Function used to test (should return a boolean) + * @param {Function} fn Function used to test (should return a boolean) * @param {Object} [thisArg] Value to use as `this` when executing function * @returns {boolean} */ @@ -280,7 +280,7 @@ class Collection extends Map { /** * Identical to * [Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce). - * @param {function} fn Function used to reduce + * @param {Function} fn Function used to reduce * @param {*} [startVal] The starting value * @returns {*} */