chore(deps): replace dependency eslint-config-standard-with-typescript with eslint-config-love 43.1.0 (#1228)

* chore(deps): replace dependency eslint-config-standard-with-typescript with eslint-config-love 43.1.0

* actually apply the rules lol

* rebuild

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
This commit is contained in:
renovate[bot]
2024-04-23 00:40:51 +02:00
committed by GitHub
parent 8aacc312cf
commit faa89850d0
53 changed files with 217 additions and 194 deletions
+10 -7
View File
@@ -134,7 +134,7 @@ export function textRecord(
): NFCRecord {
const payload = Array.from(new TextEncoder().encode(language + text));
payload.unshift(language.length);
return record(NFCTypeNameFormat.NfcWellKnown, RTD_TEXT, id || [], payload);
return record(NFCTypeNameFormat.NfcWellKnown, RTD_TEXT, id ?? [], payload);
}
const protocols = [
@@ -180,12 +180,15 @@ function encodeURI(uri: string): number[] {
let prefix = "";
protocols.slice(1).forEach(function (protocol) {
if ((!prefix || prefix === "urn:") && uri.indexOf(protocol) === 0) {
if (
(prefix.length === 0 || prefix === "urn:") &&
uri.indexOf(protocol) === 0
) {
prefix = protocol;
}
});
if (!prefix) {
if (prefix.length === 0) {
prefix = "";
}
@@ -203,7 +206,7 @@ export function uriRecord(uri: string, id?: string | number[]): NFCRecord {
return record(
NFCTypeNameFormat.NfcWellKnown,
RTD_URI,
id || [],
id ?? [],
encodeURI(uri),
);
}
@@ -256,12 +259,12 @@ export async function write(
records: NFCRecord[],
options?: WriteOptions,
): Promise<void> {
const { kind, ...opts } = options || {};
if (kind) {
const { kind, ...opts } = options ?? {};
if (kind != null) {
// @ts-expect-error map the property
opts.kind = mapScanKind(kind);
}
return await invoke("plugin:nfc|write", {
await invoke("plugin:nfc|write", {
records,
...opts,
});