Skip to content

Commit 8171430

Browse files
committed
fix: remove invalid ESLint rule @/quotes
1 parent e4280e2 commit 8171430

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

eslint.config.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ export default [...compat.extends(
5454
"no-case-declarations": "off",
5555
quotes: "off",
5656

57-
"@/quotes": ["error", "single", {
58-
avoidEscape: true,
59-
allowTemplateLiterals: true,
60-
}],
61-
6257
"prefer-rest-params": "off",
6358
"no-bitwise": "off",
6459
"no-console": "off",

ts_src/psbt/psbtutils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ import * as bscript from '../script.js';
44
import { Transaction } from '../transaction.js';
55
import { hash160 } from '../crypto.js';
66
import * as payments from '../payments/index.js';
7+
import type { PaymentCreator } from '../payments/index.js';
78
import * as tools from 'uint8array-tools';
89

910
/**
1011
* Checks if a given payment factory can generate a payment script from a given script.
1112
* @param payment The payment factory to check.
1213
* @returns A function that takes a script and returns a boolean indicating whether the payment factory can generate a payment script from the script.
1314
*/
14-
function isPaymentFactory(payment: any): (script: Uint8Array) => boolean {
15+
function isPaymentFactory(payment: PaymentCreator): (script: Uint8Array) => boolean {
1516
return (script: Uint8Array): boolean => {
1617
try {
1718
payment({ output: script });

ts_src/types.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,25 @@ export interface Tapleaf {
5858
}
5959

6060
export const TAPLEAF_VERSION_MASK = 0xfe;
61-
export function isTapleaf(o: any): o is Tapleaf {
62-
if (!o || !('output' in o)) return false;
61+
export function isTapleaf(o: unknown): o is Tapleaf {
62+
if (!o || typeof o !== 'object' || !('output' in o)) return false;
6363
if (!(o.output instanceof Uint8Array)) return false;
6464
if (o.version !== undefined)
6565
return (o.version & TAPLEAF_VERSION_MASK) === o.version;
6666
return true;
6767
}
6868

6969
/**
70-
* Binary tree repsenting script path spends for a Taproot input.
70+
* Binary tree representing script path spends for a Taproot input.
7171
* Each node is either a single Tapleaf, or a pair of Tapleaf | Taptree.
7272
* The tree has no balancing requirements.
7373
*/
7474
export type Taptree = [Taptree | Tapleaf, Taptree | Tapleaf] | Tapleaf;
7575

76-
export function isTaptree(scriptTree: any): scriptTree is Taptree {
76+
export function isTaptree(scriptTree: unknown): scriptTree is Taptree {
7777
if (!Array.isArray(scriptTree)) return isTapleaf(scriptTree);
7878
if (scriptTree.length !== 2) return false;
79-
return scriptTree.every((t: any) => isTaptree(t));
79+
return scriptTree.every((t: unknown) => isTaptree(t));
8080
}
8181

8282
export interface TinySecp256k1Interface {
@@ -110,7 +110,7 @@ export const SatoshiSchema = v.pipe(
110110
v.maxValue(0x7fff_ffff_ffff_ffffn),
111111
);
112112

113-
export const NullablePartial = (a: Record<string, any>) =>
113+
export const NullablePartial = (a: Record<string, unknown>) =>
114114
v.object(
115115
Object.entries(a).reduce(
116116
(acc, next) => ({ ...acc, [next[0]]: v.nullish(next[1]) }),

0 commit comments

Comments
 (0)