change eslint config to prefer lowercase object type over Object

pull/43/head
dperolio 3 years ago
parent 6f14cbcb8b
commit 52830cfb49
No known key found for this signature in database
GPG Key ID: 3E9BBAA710D3DDCE

@ -252,7 +252,6 @@
"settings": {
"jsdoc": {
"preferredTypes": {
"object": "Object",
"key": "key",
"value": "value",
"ReactElement": "ReactElement",

@ -50,7 +50,7 @@
/**
* An object with key value pairs where the key is usually a string (snowflake) and the
* value is usually an object.
* @typedef {Object<key, value>} Collection
* @typedef {object<key, value>} Collection
*/
//--------------
@ -63,7 +63,7 @@
*/
/**
* Emoji that have been uploaded to a guild.
* @typedef {Object} CustomEmoji
* @typedef {object} CustomEmoji
* @property {?string} allNameString Emoji name with colons included (can be null only in
* reaction emoji objects)
* @property {?string|Array} [name] Emoji name (can be null only in reaction emoji objects).
@ -77,7 +77,7 @@
*/
/**
* "Default" emoji that are inherent to Discord. There are 1741 at the time of writing this.
* @typedef {Object} DefaultEmoji
* @typedef {object} DefaultEmoji
* @property {}
* @see {@link discord.emoji.default}
*/
@ -87,7 +87,7 @@
//--------------
/**
*
* @typedef {Object} User
* @typedef {object} User
* @property {}
* @see {@link discord.user}
*/
@ -97,19 +97,19 @@
//--------------
/**
*
* @typedef {Object} Message
* @typedef {object} Message
* @property {}
* @see {@link discord.message}
*/
/**
*
* @typedef {Object} Attachment
* @typedef {object} Attachment
* @property {}
* @see {@link discord.message.attachment}
*/
/**
*
* @typedef {Object} Embed
* @typedef {object} Embed
* @property {}
* @see {@link discord.message.embed}
*/
@ -119,7 +119,7 @@
//--------------
/**
*
* @typedef {Object} UserSetting
* @typedef {object} UserSetting
* @property {}
* @see {@link discord.settings.user}
*/
@ -133,16 +133,16 @@
* <info>It's recommended to see if a guild is available before performing operations or
* reading data from it. You can check this with @see {@link discord.guild#isAvailable}.
* Reasons it may be unavailable are an outage or not currently cached.</info>
* @typedef {Object} Guild
* @typedef {object} Guild
*/
/**
*
* @typedef {Object} Member
* @typedef {object} Member
*/
/**
*
* @typedef {Object} Role
* @typedef {object} Role
* @property {}
* @see {@link discord.guild.role}
*/
@ -153,7 +153,7 @@
/**
*
* @typedef {Object} Channel
* @typedef {object} Channel
*/
//--------------
@ -161,7 +161,7 @@
//--------------
/**
*
* @typedef {Object} Activity
* @typedef {object} Activity
*/
@ -183,7 +183,7 @@
/**
* A deconstructed snowflake.
* @see {@link https://discord.js.org|discord.js}
* @typedef {Object} DeconstructedSnowflake
* @typedef {object} DeconstructedSnowflake
* @property {number} timestamp Timestamp the snowflake was created
* @property {Date} date Date the snowflake was created
* @property {number} workerID Worker ID in the snowflake
@ -196,7 +196,7 @@
// Webpack Module
//==============================================================================
/**
* @typedef {Object} WebpackModule
* @typedef {object} WebpackModule
* @property {string} test
*/
@ -208,7 +208,7 @@
//--------------
/**
* @typedef Util.Logger.label
* @type {Object}
* @type {object}
* @property {string} text Text to show in the label
* @property {string} color Color string in any format (without alpha)
*/

@ -110,7 +110,7 @@ export default class Actions extends API {
/**
* Gets the first action found matching a given filter.
* @param {Function} filter Function to use to filter actions by
* @returns {Object|null} Action matching a given filter
* @returns {object|null} Action matching a given filter
*/
getAction (filter) {
try {
@ -124,7 +124,7 @@ export default class Actions extends API {
/**
* Gets an action matching a given ID.
* @param {string} actionId Action ID
* @returns {Object|null} Action matching a given ID
* @returns {object|null} Action matching a given ID
*/
getActionById (actionId) {
try {
@ -138,7 +138,7 @@ export default class Actions extends API {
/**
* Gets all actions found matching a given filter.
* @param {Function} filter Function to use to filter actions by
* @returns {Array<Object|null>} Actions matching a given filter
* @returns {Array<object|null>} Actions matching a given filter
*/
getActions (filter) {
try {
@ -152,7 +152,7 @@ export default class Actions extends API {
/**
* Gets all actions matching a given caller.
* @param {string} addonId Addon ID
* @returns {Array<Object|null>} Actions matching a given caller
* @returns {Array<object|null>} Actions matching a given caller
*/
getActionsByCaller (addonId) {
try {
@ -165,7 +165,7 @@ export default class Actions extends API {
/**
* Gets all actions.
* @returns {Array<Object|null>} All actions
* @returns {Array<object|null>} All actions
*/
getAllActions () {
try {

@ -178,7 +178,7 @@ export default class Commands extends API {
/**
* Gets the first command found matching a given filter.
* @param {Function} filter Function to use to filter commands by
* @returns {Object|null} Command matching a given filter
* @returns {object|null} Command matching a given filter
*/
getCommand (filter) {
try {
@ -192,7 +192,7 @@ export default class Commands extends API {
/**
* Gets a command matching a given name.
* @param {string} commandName Command name
* @returns {Object|null} Command matching a given name
* @returns {object|null} Command matching a given name
*/
getCommandByName (commandName) {
try {
@ -206,7 +206,7 @@ export default class Commands extends API {
/**
* Gets all commands found matching a given filter.
* @param {Function} filter Function to use to filter commands by
* @returns {Array<Object|null>} Commands matching a given filter
* @returns {Array<object|null>} Commands matching a given filter
*/
getCommands (filter) {
try {
@ -220,7 +220,7 @@ export default class Commands extends API {
/**
* Gets all commands matching a given caller.
* @param {string} addonId Addon ID
* @returns {Array<Object|null>} Commands matching a given caller
* @returns {Array<object|null>} Commands matching a given caller
*/
getCommandsByCaller (addonId) {
try {
@ -233,7 +233,7 @@ export default class Commands extends API {
/**
* Gets all commands.
* @returns {Array<Object|null>} All commands
* @returns {Array<object|null>} All commands
*/
getAllCommands () {
try {

@ -14,7 +14,7 @@
* @property {string} [id] Keybind ID
* @property {string} shortcut Keyboard shortcut
* @property {Function} executor Keybind executor
* @property {Object} [options] Keybind options
* @property {object} [options] Keybind options
* @property {boolean} [options.blurred=false] Whether the keybind should activate while Discord is unfocused
* @property {boolean} [options.focused=true] Whether the keybind should activate while Discord is focused
* @property {boolean} [options.keydown=false] Whether the keybind should activate on keydown
@ -163,7 +163,7 @@ export default class Keybinds extends API {
/**
* Gets the first keybind found matching a given filter.
* @param {Function} filter Function to use to filter keybinds by
* @returns {Object|null} Keybind matching a given filter
* @returns {object|null} Keybind matching a given filter
*/
getKeybind (filter) {
try {
@ -177,7 +177,7 @@ export default class Keybinds extends API {
/**
* Gets a keybind matching a given ID.
* @param {string} keybindId Keybind ID
* @returns {Object|null} Keybind matching a given ID
* @returns {object|null} Keybind matching a given ID
*/
getKeybindById (keybindId) {
try {
@ -191,7 +191,7 @@ export default class Keybinds extends API {
/**
* Gets a keybind matching a given shortcut.
* @param {string} shortcut Keybind shortcut
* @returns {Object|null} Keybind matching a given shortcut
* @returns {object|null} Keybind matching a given shortcut
*/
getKeybindByShortcut (shortcut) {
try {
@ -205,7 +205,7 @@ export default class Keybinds extends API {
/**
* Gets all keybinds found matching a given filter.
* @param {Function} filter Function to use to filter keybinds by
* @returns {Array<Object|null>} Keybinds matching a given filter
* @returns {Array<object|null>} Keybinds matching a given filter
*/
getKeybinds (filter) {
try {
@ -219,7 +219,7 @@ export default class Keybinds extends API {
/**
* Gets all keybinds matching a given caller.
* @param {string} addonId Addon ID
* @returns {Array<Object|null>} Keybinds matching a given caller
* @returns {Array<object|null>} Keybinds matching a given caller
*/
getKeybindsByCaller (addonId) {
try {
@ -232,7 +232,7 @@ export default class Keybinds extends API {
/**
* Gets all keybinds.
* @returns {Array<Object|null>} All keybinds
* @returns {Array<object|null>} All keybinds
*/
getAllKeybinds () {
try {

@ -235,7 +235,7 @@ export default class Notifications extends API {
/**
* Gets the first notice found matching a given filter.
* @param {Function} filter Function to use to filter notices by
* @returns {Object|null} Notice matching a given filter
* @returns {object|null} Notice matching a given filter
*/
getNotice (filter) {
try {
@ -249,7 +249,7 @@ export default class Notifications extends API {
/**
* Gets the first toast found matching a given filter.
* @param {Function} filter Function to use to filter toasts by
* @returns {Object|null} Toast matching a given filter
* @returns {object|null} Toast matching a given filter
*/
getToast (filter) {
try {
@ -263,7 +263,7 @@ export default class Notifications extends API {
/**
* Gets a notice matching a given ID.
* @param {string} noticeId Notice ID
* @returns {Object|null} Notice matching a given ID
* @returns {object|null} Notice matching a given ID
*/
getNoticeById (noticeId) {
try {
@ -277,7 +277,7 @@ export default class Notifications extends API {
/**
* Gets a toast matching a given ID.
* @param {string} toastId Toast ID
* @returns {Object|null} Toast matching a given ID
* @returns {object|null} Toast matching a given ID
*/
getToastById (toastId) {
try {
@ -291,7 +291,7 @@ export default class Notifications extends API {
/**
* Gets all notices found matching a given filter.
* @param {Function} filter Function to use to filter notices by
* @returns {Array<Object|null>} Notices matching a given filter
* @returns {Array<object|null>} Notices matching a given filter
*/
getNotices (filter) {
try {
@ -305,7 +305,7 @@ export default class Notifications extends API {
/**
* Gets all toasts found matching a given filter.
* @param {Function} filter Function to use to filter toasts by
* @returns {Array<Object|null>} Toasts matching a given filter
* @returns {Array<object|null>} Toasts matching a given filter
*/
getToasts (filter) {
try {
@ -319,7 +319,7 @@ export default class Notifications extends API {
/**
* Gets all notices matching a given caller.
* @param {string} addonId Addon ID
* @returns {Array<Object|null>} Notices matching a given caller
* @returns {Array<object|null>} Notices matching a given caller
*/
getNoticesByCaller (addonId) {
try {
@ -333,7 +333,7 @@ export default class Notifications extends API {
/**
* Gets all toasts matching a given caller.
* @param {string} addonId Addon ID
* @returns {Array<Object|null>} Toasts matching a given caller
* @returns {Array<object|null>} Toasts matching a given caller
*/
getToastsByCaller (addonId) {
try {
@ -346,7 +346,7 @@ export default class Notifications extends API {
/**
* Gets all notices.
* @returns {Array<Object|null>} All notices
* @returns {Array<object|null>} All notices
*/
getAllNotices () {
try {
@ -358,7 +358,7 @@ export default class Notifications extends API {
/**
* Gets all toasts.
* @returns {Array<Object|null>} All toasts
* @returns {Array<object|null>} All toasts
*/
getAllToasts () {
try {
@ -370,7 +370,7 @@ export default class Notifications extends API {
/**
* Gets all active toasts.
* @returns {Array<Object|null>} All active toasts
* @returns {Array<object|null>} All active toasts
*/
getAllActiveToasts () {
try {
@ -388,7 +388,7 @@ export default class Notifications extends API {
/**
* Gets all queued toasts.
* @returns {Array<Object|null>} All queued toasts
* @returns {Array<object|null>} All queued toasts
*/
getAllQueuedToasts () {
try {

@ -543,9 +543,9 @@ export default class AddonManager extends Events {
}
/**
* Sets a plugin or theme's icon image URL.
* Sets an addon's icon image URL.
* @param {string} addonId Addon ID
* @param {Object} manifest Addon manifest
* @param {object} manifest Addon manifest
* @private
*/
async _setAddonIcon (addonId, manifest) {

@ -7,7 +7,7 @@ import { getObjectURL } from '../util/File';
* Hook that uses util.file.getObjectURL to get an async collection of blob object URLs.
* @param {string} requestType Request type. One of get, post, put, or del.
* @param {url} url URL to call
* @param {string|Object} [headers] Headers
* @param {string|object} [headers] Headers
*/
export function useFetch (requestType, url, headers) {
const [ response, setResponse ] = useState(null);

@ -58,7 +58,7 @@ const modules = {
/**
* Outputs messages to console of varying types. Outputted messages contain a badge, label(s), and a message.
* @param {Object} options Options for the console message
* @param {object} options Options for the console message
* @param {string} [options.type='log'] Type of console method to use
* @param {string} [options.badge='vz-asset://images/logo.png'] Badge image URL
* @param {Array<string|Util.Logger.label>} [options.labels] Label texts or label objects. Limit of 10.
@ -166,7 +166,7 @@ const _logHandler = options => {
/**
* Logs an informational message to dev tools console.
* @param {Object} options Options for the console message
* @param {object} options Options for the console message
* @param {string} [options.badge] Badge image URL
* @param {Array<string|Util.Logger.label>} [options.labels] Label texts or label objects
* @param {*|Array<*>} [options.message] Contents of the console message
@ -183,7 +183,7 @@ export const log = options => {
/**
* Logs a warning message to dev tools console.
* @param {Object} options Options for the console message
* @param {object} options Options for the console message
* @param {string} [options.badge] Badge image URL
* @param {Array<string|Util.Logger.label>} [options.labels] Label texts or label objects
* @param {*|Array<*>} [options.message] Contents of the console message
@ -200,7 +200,7 @@ export const warn = options => {
/**
* Logs an error message to dev tools console.
* @param {Object} options Options for the console message
* @param {object} options Options for the console message
* @param {string} [options.badge] Badge image URL
* @param {Array<string|Util.Logger.label>} [options.labels] Label texts or label objects
* @param {*|Array<*>} [options.message] Contents of the console message
@ -217,7 +217,7 @@ export const error = options => {
/**
* Logs a deprecation (warning) message to dev tools console.
* @param {Object} options Options for the console message
* @param {object} options Options for the console message
* @param {string} [options.badge] Badge image URL
* @param {Array<string|Util.Logger.label>} [options.labels] Label texts or label objects
* @param {*|Array<*>} [options.message] Contents of the console message

@ -24,9 +24,9 @@ const _error = (labels, ...message) => error({ labels, message });
* Finds a value, subobject, or array from a tree that matches a specific filter.
* @copyright MIT License - (c) 2018 Zachary Rauen
* @see {@link https://github.com/rauenzi/BDPluginLibrary/blob/master/src/modules/utilities.js#L140}
* @param {Object} tree Tree that should be walked
* @param {object} tree Tree that should be walked
* @param {Function} filter Filter to check against each object and subobject
* @param {Object} [options={}] Additional options to customize the search
* @param {object} [options={}] Additional options to customize the search
* @param {Array<string>|null} [options.walkable=[]] Array of strings to use as keys
* that are allowed to be walked on. Null value indicates all keys are walkable
* @param {Array<string>} [options.ignore=[]] Array of strings to use as keys to exclude

Loading…
Cancel
Save