summaryrefslogtreecommitdiff
path: root/eslint.config.js
diff options
context:
space:
mode:
authorPawel Zelawski <pawel.zelawski@outlook.com>2025-04-14 10:30:43 +0200
committerPawel Zelawski <pawel.zelawski@outlook.com>2025-04-14 10:30:43 +0200
commitb354d96163e2ba2103f7d8b101dae547eb4747fa (patch)
treea1be4510d0b82797a4ed465e534c15924d8d2082 /eslint.config.js
parente5a32e3002dfd5c17c847013cd27092f96ac2fba (diff)
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.
Diffstat (limited to 'eslint.config.js')
-rw-r--r--eslint.config.js28
1 files changed, 21 insertions, 7 deletions
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