Skip to content

Commit e656c33

Browse files
authored
Cleanup code and tests for package lifecycle work (#127)
* Update tsconfig to node20 * Some more fixes to BigInt * Skip lib check in created package
1 parent 115b7c0 commit e656c33

24 files changed

+3702
-5011
lines changed

.eslintrc.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ module.exports = {
33
jest: true,
44
node: true,
55
},
6-
plugins: ['@typescript-eslint', 'prettier', 'import', 'prefer-arrow'],
6+
plugins: [
7+
'@typescript-eslint',
8+
'prettier',
9+
'import',
10+
'prefer-arrow'
11+
],
712
parser: '@typescript-eslint/parser',
813
parserOptions: {
9-
ecmaVersion: 2017,
14+
ecmaVersion: 'latest',
1015
sourceType: 'module',
1116
project: './tsconfig.eslint.json',
1217
},
@@ -34,13 +39,16 @@ module.exports = {
3439
'@typescript-eslint/no-empty-function': ['warn'],
3540
'@typescript-eslint/no-explicit-any': ['warn'],
3641

42+
'@typescript-eslint/no-unused-vars': ['warn'],
43+
'@typescript-eslint/no-loss-of-precision': ['warn'],
44+
3745
// Require all imported dependencies are actually declared in package.json
3846
'import/no-extraneous-dependencies': ['error'],
3947
'import/no-unresolved': ['error'],
4048
},
4149
overrides: [
4250
{
43-
files: ['*.js', '*.jsx'],
51+
files: ['*.js', '*.jsx', '*.cjs'],
4452
rules: {
4553
'@typescript-eslint/explicit-function-return-type': 'off',
4654
'@typescript-eslint/no-unused-vars': 'off',

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/setup-python@v4
11+
- uses: actions/setup-python@v5
1212
with:
1313
python-version: 3.9
1414
os_build:

.pre-commit-config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ repos:
1919
- --fix=lf
2020
- id: trailing-whitespace
2121
- id: pretty-format-json
22+
exclude: ^tsconfig.*.json
2223
args:
2324
- --autofix
2425
- --indent=4
@@ -56,7 +57,7 @@ repos:
5657
types: []
5758
files: (.*.js$|.*.ts$)
5859
additional_dependencies:
59-
- eslint@6.8.0
60+
- eslint@8.21.0
6061
- repo: local
6162
hooks:
6263
- id: pylint-local

jest.config.js renamed to jest.config.cjs

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
const { ignorePatterns } = require('./.eslintrc');
2+
13
module.exports = {
24
preset: 'ts-jest',
35
testEnvironment: 'node',
4-
globals: {
5-
'ts-jest': {
6-
ignoreCoverageForAllDecorators: true,
7-
},
6+
transform: {
7+
'^.+\\.ts?$': [
8+
'ts-jest',
9+
{
10+
ignoreCoverageForAllDecorators: true,
11+
tsconfig: 'tsconfig.test.json',
12+
},
13+
],
814
},
915
testRegex: '\\.test.ts$',
1016
testRunner: 'jest-circus/runner',

0 commit comments

Comments
 (0)