Update linting

This commit is contained in:
Zaid Humaimidi committed 2023-12-16 19:08:13 -08:00
1 parent 4f2dfb4f48
commit 0c9c027a77
112 files changed
+3781 -4125

No files matched your search

+3 -3
View File
@@ -27,7 +27,7 @@ ava("digest", (t) => {
uri,
method,
body,
wwwAuthHeader
wwwAuthHeader,
);
const authHeader = auth.parseAuthorizationHeader(solution);
t.is(
@@ -42,8 +42,8 @@ ava("digest", (t) => {
authHeader["qop"],
body,
authHeader["cnonce"],
authHeader["nc"]
)
authHeader["nc"],
),
);
}
});
+1 -1
View File
@@ -55,7 +55,7 @@ ava("convertOldPrecondition", (t) => {
for (const test of tests) {
t.is(
stringify(convertOldPrecondition(test[0] as Record<string, unknown>)),
test[1]
test[1],
);
}
+1 -1
View File
@@ -85,7 +85,7 @@ ava("unpack", (t) => {
let unpacked: Path[];
unpacked = device.unpack(
deviceData,
Path.parse("a.[b:b,c:c].a.[b:b1,c:c1].a")
Path.parse("a.[b:b,c:c].a.[b:b1,c:c1].a"),
);
t.is(unpacked.length, 2);
t.is(unpacked[0].toString(), "a.1.a.1.a");
+6 -6
View File
@@ -38,31 +38,31 @@ ava("find", (t) => {
t.deepEqual(
pathSet.find(Path.parse(""), true, true, 1).map((p) => p.toString()),
["a"]
["a"],
);
t.deepEqual(
pathSet.find(Path.parse(""), false, false, 2).map((p) => p.toString()),
["a", "a.*", "a.a", "*.a", "*.*"]
["a", "a.*", "a.a", "*.a", "*.*"],
);
t.deepEqual(
pathSet.find(Path.parse("a.*"), false, false).map((p) => p.toString()),
["a.*"]
["a.*"],
);
t.deepEqual(
pathSet.find(Path.parse("a.*"), false, true).map((p) => p.toString()),
["a.*", "a.a"]
["a.*", "a.a"],
);
t.deepEqual(
pathSet.find(Path.parse("a.*"), true, false).map((p) => p.toString()),
["a.*", "*.*"]
["a.*", "*.*"],
);
t.deepEqual(
pathSet.find(Path.parse("a.*"), true, true).map((p) => p.toString()),
["a.*", "a.a", "*.a", "*.*"]
["a.*", "a.a", "*.a", "*.*"],
);
});
+4 -4
View File
@@ -21,7 +21,7 @@ test.before(async (t) => {
};
db.run(
"CREATE TABLE test (id INTEGER PRIMARY KEY, string STRING, decimal DECIMAL(4,2))"
"CREATE TABLE test (id INTEGER PRIMARY KEY, string STRING, decimal DECIMAL(4,2))",
);
const stmt = db.prepare("INSERT INTO test (string, decimal) VALUES (?, ?)");
@@ -72,16 +72,16 @@ test("minimize", async (t) => {
STRING_VALUES.filter((s) => s),
STRING_VALUES.filter((s) => s),
[">", "=", "<"],
["<>", ">="]
["<>", ">="],
)) {
cases.push(
`string ${op1} "${s1}" OR string ='${s2}' OR NOT string ${op2} '${s3}'`
`string ${op1} "${s1}" OR string ='${s2}' OR NOT string ${op2} '${s3}'`,
);
}
for (const [s1, s2] of getPermutations(
STRING_VALUES.filter((s) => s),
STRING_VALUES.filter((s) => s)
STRING_VALUES.filter((s) => s),
))
cases.push(`string > "${s1}" AND string < '${s2}'`);
+1 -1
View File
@@ -36,6 +36,6 @@ ava("generateDeviceId", (t) => {
ava("escapeRegExp", (t) => {
t.is(
common.escapeRegExp("\\ ^ $ * + ? . ( ) | { } [ ]"),
"\\\\ \\^ \\$ \\* \\+ \\? \\. \\( \\) \\| \\{ \\} \\[ \\]"
"\\\\ \\^ \\$ \\* \\+ \\? \\. \\( \\) \\| \\{ \\} \\[ \\]",
);
});
+2 -2
View File
@@ -7,7 +7,7 @@ import {
ava("parseXmlDeclaration", (t) => {
const buf = Buffer.from(
'<?xml version="1.0" encoding="UTF-8"?>\n<soap-env:Envelope />'
'<?xml version="1.0" encoding="UTF-8"?>\n<soap-env:Envelope />',
);
const attrs = parseXmlDeclaration(buf);
t.deepEqual(attrs, [
@@ -29,7 +29,7 @@ ava("parseXmlDeclaration", (t) => {
ava("decodeEntities", (t) => {
t.is(
decodeEntities("&&amp;&lt;&gt;&quot;&apos;&gt;&#167;&#xd842;&#xDFB7;;"),
"&&<>\"'>§𠮷;"
"&&<>\"'>§𠮷;",
);
});