-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #194 from Stephen-Thomson/fix-lint-errors-iteratively
Tests and build work.
- Loading branch information
Showing
190 changed files
with
15,550 additions
and
32,932 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
node_modules | ||
/dist | ||
/coverage | ||
/coverage | ||
|
||
eslint-debug-output.txt | ||
file_list.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/Point.ts | ||
src/primitives/Point.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"standard.engine": "ts-standard" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import globals from 'globals' | ||
import pluginJs from '@eslint/js' | ||
import tseslint from 'typescript-eslint' | ||
import tsStandard from 'ts-standard' | ||
import pluginJest from 'eslint-plugin-jest' | ||
|
||
export default [ | ||
tsStandard, // ✅ Ensure ESLint loads ts-standard as a base config | ||
|
||
{ | ||
// Add ignorePatterns at the top level for ESLint | ||
ignorePatterns: ['src/primitives/Point.ts'], | ||
|
||
files: ['src/**/*.ts', '**/*.{js,mjs,cjs,ts,jsx,tsx}'], // ✅ Ensure TS files are included | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
process: 'readonly', | ||
...globals.jest | ||
}, | ||
parser: tseslint.parser, | ||
parserOptions: { | ||
project: './tsconfig.json', // ✅ Ensure this file exists | ||
tsconfigRootDir: process.cwd() // ✅ Use process.cwd() instead of import.meta.dirname | ||
} | ||
}, | ||
plugins: { | ||
'@typescript-eslint': tseslint.plugin, | ||
jest: pluginJest | ||
}, | ||
rules: { | ||
...tseslint.configs.recommended.rules, // ✅ TypeScript ESLint rules | ||
...pluginJs.configs.recommended.rules, // ✅ ESLint recommended rules | ||
|
||
// ✅ Jest-specific rules | ||
'jest/no-disabled-tests': 'warn', | ||
'jest/no-focused-tests': 'error', | ||
'jest/no-identical-title': 'error', | ||
'jest/prefer-to-have-length': 'warn', | ||
'jest/valid-expect': 'error' | ||
} | ||
} | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
export default { | ||
preset: 'ts-jest', | ||
// Use the preset specifically designed for ESM | ||
preset: 'ts-jest/presets/default-esm', | ||
|
||
// Use the Node environment for testing | ||
testEnvironment: 'node', | ||
|
||
// Ignore compiled output | ||
testPathIgnorePatterns: ['dist/'], | ||
moduleDirectories: ['node_modules', 'src'], | ||
collectCoverageFrom: ['src/**/*.ts'], | ||
|
||
// ✅ Ensure Jest can resolve imports correctly | ||
moduleNameMapper: { | ||
'^@primitives/(.*)$': '<rootDir>/src/primitives/$1', | ||
'^@auth/(.*)$': '<rootDir>/src/auth/$1', | ||
'^@transaction/(.*)$': '<rootDir>/src/transaction/$1', | ||
'^@wallet/(.*)$': '<rootDir>/src/wallet/$1', | ||
'^@compat/(.*)$': '<rootDir>/src/compat/$1', | ||
'^@messages/(.*)$': '<rootDir>/src/messages/$1', | ||
'^@overlay-tools/(.*)$': '<rootDir>/src/overlay-tools/$1', | ||
'^@script/(.*)$': '<rootDir>/src/script/$1', | ||
'^@totp/(.*)$': '<rootDir>/src/totp/$1' | ||
// These globals configure ts-jest to output ESM | ||
globals: { | ||
'ts-jest': { | ||
useESM: true | ||
} | ||
}, | ||
|
||
// ✅ Ensure Jest recognizes TypeScript and resolves `.ts` extensions | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'] | ||
// Tell Jest that files ending in .ts should be treated as ESM modules | ||
extensionsToTreatAsEsm: ['.ts'], | ||
|
||
// Optionally, if you have imports with a .js extension in your source (or tests) | ||
// but your source files are actually TypeScript, this mapper will remove the extension. | ||
moduleNameMapper: { | ||
'^(\\.{1,2}/.*)\\.js$': '$1' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
export * from './src/primitives/index' | ||
export * from './src/script/index' | ||
export * from './src/script/templates/index' | ||
export * from './src/transaction/index' | ||
export * from './src/transaction/fee-models/index' | ||
export * from './src/transaction/broadcasters/index' | ||
export * from './src/transaction/chaintrackers/index' | ||
export * from './src/transaction/http/index' | ||
export * from './src/messages/index' | ||
export * from './src/compat/index' | ||
export * from './src/totp/index' | ||
export * from './src/wallet/index' | ||
export * from './src/wallet/substrates/index' | ||
export * from './src/auth/index' | ||
export * from './src/overlay-tools/index' | ||
export * from './src/primitives/index.js' | ||
export * from './src/script/index.js' | ||
export * from './src/script/templates/index.js' | ||
export * from './src/transaction/index.js' | ||
export * from './src/transaction/fee-models/index.js' | ||
export * from './src/transaction/broadcasters/index.js' | ||
export * from './src/transaction/chaintrackers/index.js' | ||
export * from './src/transaction/http/index.js' | ||
export * from './src/messages/index.js' | ||
export * from './src/compat/index.js' | ||
export * from './src/totp/index.js' | ||
export * from './src/wallet/index.js' | ||
export * from './src/wallet/substrates/index.js' | ||
export * from './src/auth/index.js' | ||
export * from './src/overlay-tools/index.js' |
Oops, something went wrong.