From b354d96163e2ba2103f7d8b101dae547eb4747fa Mon Sep 17 00:00:00 2001 From: Pawel Zelawski Date: Mon, 14 Apr 2025 10:30:43 +0200 Subject: fix: Correct Bech32 address verification via dependency change - Replaced faulty 'digibyte-message' dependency with 'bitcoinjs-message'. - This resolves a critical bug where signatures from DigiByte Bech32 addresses (dgb1...) could not be verified due to issues in the old dependency chain. - digiid-ts now correctly handles Legacy (D...), SegWit (S...), and Bech32 (dgb1...) address signature verification. - Updated build configurations and addressed related linting issues revealed during testing. --- eslint.config.js | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'eslint.config.js') diff --git a/eslint.config.js b/eslint.config.js index 1d3d290..2ba7fbb 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -4,25 +4,39 @@ import tseslintParser from '@typescript-eslint/parser'; import prettier from 'eslint-config-prettier'; export default [ + // Global ignores (apply first) + { + ignores: [ + 'dist/**', + 'node_modules/**', + 'examples/verify-callback-example.ts', + 'examples/verify-callback.ts', // Ignore this file too + 'examples/generate-uri.ts' // Ignore this file too + ] + }, + // Default JS rules for all JS/TS files js.configs.recommended, { - ignores: ['dist/**/*', '*.d.ts', '*.js.map', '*.d.ts.map'], - files: ['**/*.ts'], + // Apply TS rules specifically to .ts files within src and tests + files: ['src/**/*.ts'], // Adjusted to include tests languageOptions: { parser: tseslintParser, parserOptions: { - project: ['./tsconfig.json'], + project: ['./tsconfig.json'], // Apply project-based parsing only here tsconfigRootDir: '.', }, + globals: { // Define Node.js globals if needed + NodeJS: true + } }, plugins: { '@typescript-eslint': tseslint, }, rules: { - ...tseslint.configs.recommended.rules, - ...prettier.rules, - '@typescript-eslint/no-explicit-any': 'warn', - 'no-undef': 'off', + ...tseslint.configs.recommended.rules, // Apply TS recommended rules + '@typescript-eslint/no-explicit-any': 'error', // Make this an error now }, }, + // Prettier rules (apply last) + prettier, ]; \ No newline at end of file -- cgit v1.2.3