Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions package/timestamp_service/.eslintignore

This file was deleted.

10 changes: 0 additions & 10 deletions package/timestamp_service/.eslintrc.json

This file was deleted.

28 changes: 28 additions & 0 deletions package/timestamp_service/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// eslint.config.mjs

import tseslint from '@typescript-eslint/eslint-plugin'
import tsParser from '@typescript-eslint/parser'
import prettier from 'eslint-config-prettier'

export default [
{
ignores: ['/logs/', 'node_modules/', 'bin/mc', '*.tar.gz', '*.sh', 'dist', 'build']
},
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tsParser
},
plugins: {
'@typescript-eslint': tseslint
},
rules: {
...tseslint.configs.recommended.rules,
...prettier.rules,

'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/explicit-function-return-type': 'error'
}
}
]
22 changes: 10 additions & 12 deletions package/timestamp_service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,32 @@
"vitest:feature": "yarn vitest feature/",
"lint": "eslint ./src ./test && echo 'npm run lint: OK'",
"lint:fix": "eslint . --fix",
"format": "prettier -w .",
"test": "npm run lint --silent && echo 'npm test: OK'",
"release": "rm -rf ./build && yarn build && npm publish --access public"
},
"type": "module",
"dependencies": {
"@techteamer/cert-utils": "^1.1.3",
"@techteamer/cert-utils": "^2.0.0",
"@types/node-fetch": "^3",
"node-fetch": "^3",
"proxy-agent": "^6.5.0",
"proxy-agent": "^8.0.0",
"tmp": "^0.2.1"
},
"devDependencies": {
"@rollup/plugin-typescript": "^12.1.4",
"@types/node": "^20.14.6",
"@types/node": "^25.9.1",
"@types/tmp": "^0.2.6",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.13.1",
"@vitest/coverage-v8": "^2.0.2",
"eslint": "^8.19.0",
"@typescript-eslint/eslint-plugin": "^8.60.0",
"@typescript-eslint/parser": "^8.60.0",
"@vitest/coverage-v8": "^4.1.7",
"eslint": "^10.4.0",
"eslint-config-prettier": "^10.1.8",
"eslint-config-standard": "^17.0.0",
"nock": "^13.5.4",
"prettier": "^3.6.2",
"nock": "^14.0.15",
"rollup": "^4.18.0",
"rollup-plugin-esbuild": "^6.1.1",
"typescript": "~5.5",
"vitest": "^2.0.2"
"typescript": "^6.0.0",
"vitest": "^4.1.7"
},
"resolutions": {
"strip-ansi": "6.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import { CreateTimestampTokenError } from '../../../src/trustedTimestamp/error/c
import { TimestampConfig } from '../../../src/trustedTimestamp/types/timestamp-config.type'

vi.mock('@techteamer/cert-utils', () => ({
CertService: vi.fn().mockImplementation(() => ({
get CertType(): { P12: 'P12'; PEM: 'PEM' } {
return {
CertService: vi.fn().mockImplementation(function () {
return {
CertType: {
P12: 'P12',
PEM: 'PEM'
}
},
parseCert: (): null => null
}))
},
parseCert: vi.fn(() => null)
}
})
}))

describe('TrustedTimestampService.js (feature-test)', () => {
Expand Down
4 changes: 3 additions & 1 deletion package/timestamp_service/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"outDir": "build",
"allowJs": true,
"allowSyntheticDefaultImports": true,
"baseUrl": "src",
"paths": {
"*": ["./src/*"]
},
"declaration": true,
"esModuleInterop": true,
"inlineSourceMap": false,
Expand Down
Loading
Loading