Skip to content

Commit b551004

Browse files
Merge pull request #1 from frantisekstanko/dev
rework configuration
2 parents 544e68d + 781fdf3 commit b551004

28 files changed

Lines changed: 939 additions & 510 deletions

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.5.0] - 2025-10-05
9+
10+
### Changed
11+
12+
- Migrated configuration files to TypeScript (`eslint.config.ts`, `jest.config.ts`)
13+
- Separated build configuration into `tsconfig.build.json`
14+
- Updated ESLint to check all files instead of only `src/**/*.ts`
15+
- Improved test code style with explicit arrow function braces for consistency
16+
- TypeScript array type preference set to `[]` notation
17+
18+
### Added
19+
20+
- `.nvmrc` file specifying Node.js 20 as the recommended version
21+
- Explicit ESLint ignores for `node_modules/`, `dist/`, and `tests/coverage/`
22+
- ESLint rule to allow empty functions in test files
23+
- `jiti` and `ts-node` dev dependencies for TypeScript execution support
24+
825
## [0.4.1] - 2025-10-05
926

1027
### Fixed
@@ -57,6 +74,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5774
- Full test coverage with Jest
5875
- TypeScript declaration files
5976

77+
[0.5.0]: https://github.com/frantisekstanko/assertion/compare/v0.4.1...v0.5.0
6078
[0.4.1]: https://github.com/frantisekstanko/assertion/compare/v0.4.0...v0.4.1
6179
[0.4.0]: https://github.com/frantisekstanko/assertion/compare/v0.3.0...v0.4.0
6280
[0.3.0]: https://github.com/frantisekstanko/assertion/releases/tag/v0.3.0

codecov.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 100%
6+
threshold: 0%
7+
patch:
8+
default:
9+
target: 100%
10+
threshold: 0%
11+
12+
comment:
13+
layout: 'diff, flags, files'
14+
require_changes: true
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import eslint from '@eslint/js'
22
import tseslint from 'typescript-eslint'
33

44
export default [
5+
{
6+
ignores: ['node_modules/', 'dist/', 'tests/coverage/'],
7+
},
58
eslint.configs.recommended,
69
...tseslint.configs.strictTypeChecked,
710
...tseslint.configs.stylisticTypeChecked,
@@ -17,4 +20,10 @@ export default [
1720
'@typescript-eslint/no-extraneous-class': 'off',
1821
},
1922
},
23+
{
24+
files: ['tests/**/*.ts'],
25+
rules: {
26+
'@typescript-eslint/no-empty-function': 'off',
27+
},
28+
},
2029
]
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
export default {
1+
import type { Config } from 'jest'
2+
3+
const config: Config = {
24
preset: 'ts-jest',
35
testEnvironment: 'node',
46
roots: ['<rootDir>/tests'],
57
testMatch: ['**/*.test.ts'],
68
coverageDirectory: 'tests/coverage',
7-
collectCoverageFrom: [
8-
'src/**/*.ts',
9-
'!src/**/*.d.ts'
10-
],
9+
collectCoverageFrom: ['src/**/*.ts', '!src/**/*.d.ts'],
1110
coverageThreshold: {
1211
global: {
1312
branches: 100,
1413
functions: 100,
1514
lines: 100,
16-
statements: 100
17-
}
18-
}
19-
};
15+
statements: 100,
16+
},
17+
},
18+
}
19+
20+
export default config

package-lock.json

Lines changed: 164 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@frantisekstanko/assertion",
3-
"version": "0.4.1",
3+
"version": "0.5.0",
44
"description": "Type-safe assertion library for TypeScript",
55
"type": "module",
66
"main": "dist/index.js",
@@ -19,11 +19,11 @@
1919
"CHANGELOG.md"
2020
],
2121
"scripts": {
22-
"build": "tsc",
22+
"build": "tsc --project tsconfig.build.json",
2323
"test": "jest --bail",
2424
"test:watch": "jest --watchAll",
2525
"test:coverage": "jest --coverage",
26-
"lint": "eslint src/**/*.ts && tsc --noEmit",
26+
"lint": "eslint . && tsc --noEmit",
2727
"prepublishOnly": "npm run build"
2828
},
2929
"keywords": [
@@ -64,7 +64,9 @@
6464
"@typescript-eslint/parser": "^8.38.0",
6565
"eslint": "^9.32.0",
6666
"jest": "^30.0.5",
67+
"jiti": "^2.6.1",
6768
"ts-jest": "^29.4.0",
69+
"ts-node": "^10.9.2",
6870
"typescript": "^5.8.3",
6971
"typescript-eslint": "^8.45.0"
7072
}

0 commit comments

Comments
 (0)