fix: lint (#7433)
* chore: fix lint * fix: constants check:lint command * chore(lint): permit unused vars which begin w/ _ * chore: rm dead code * fix(lint): more lint fixes to constants pkg * fix(lint): lint the live server - fix lint issues * chore: improve clean script * fix(lint): more lint * chore: set live server process title * chore(deps): update to turbo@2.5.5 * chore(live): target node22 * fix(dev): add missing ui pkg dependency * fix(dev): lint decorators * fix(dev): lint space app * fix(dev): address lint issues in types pkg * fix(dev): lint editor pkg * chore(dev): moar lint * fix(dev): live server exit code * chore: address PR feedback * fix(lint): better TPageExtended type * chore: refactor * chore: revert most live server changes * fix: few more lint issues * chore: enable ci checks Ensure we can build + confirm that lint is not getting worse. * chore: address PR feedback * fix: web lint warning added to package.json * fix: ci:lint command --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
parent
514686d9d5
commit
57479f4554
95 changed files with 348 additions and 460 deletions
|
|
@ -102,26 +102,6 @@ export const getNumberCount = (number: number): string => {
|
|||
return number.toString();
|
||||
};
|
||||
|
||||
/**
|
||||
* @description Converts object to URL query parameters string
|
||||
* @param {Object} obj - Object to convert
|
||||
* @returns {string} URL query parameters string
|
||||
* @example
|
||||
* objToQueryParams({ page: 1, search: "test" }) // returns "page=1&search=test"
|
||||
* objToQueryParams({ a: null, b: "test" }) // returns "b=test"
|
||||
*/
|
||||
export const objToQueryParams = (obj: any) => {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
if (!obj) return params.toString();
|
||||
|
||||
for (const [key, value] of Object.entries(obj)) {
|
||||
if (value !== undefined && value !== null) params.append(key, value as string);
|
||||
}
|
||||
|
||||
return params.toString();
|
||||
};
|
||||
|
||||
/**
|
||||
* @description: This function will capitalize the first letter of a string
|
||||
* @param str String
|
||||
|
|
@ -268,7 +248,7 @@ export const substringMatch = (text: string, searchQuery: string): boolean => {
|
|||
|
||||
// Not all characters of searchQuery found in order
|
||||
return false;
|
||||
} catch (error) {
|
||||
} catch (_err) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
@ -297,7 +277,7 @@ const fallbackCopyTextToClipboard = (text: string) => {
|
|||
// FIXME: Even though we are using this as a fallback, execCommand is deprecated 👎. We should find a better way to do this.
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand
|
||||
document.execCommand("copy");
|
||||
} catch (err) {
|
||||
} catch (_err) {
|
||||
// catch fallback error
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue