diff --git a/.depcheckrc.json b/.depcheckrc.json index 28529cef..2d47463c 100644 --- a/.depcheckrc.json +++ b/.depcheckrc.json @@ -1,7 +1,8 @@ { "parsers": { "**/*.mjs": "es6", - "**/*.ts": "typescript" + "**/*.ts": "typescript", + "**/*.mts": "typescript" }, "ignores": [ "@lavamoat/allow-scripts", diff --git a/.eslintrc.js b/.eslintrc.js index c1cb4a1e..112e5826 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,12 +5,12 @@ module.exports = { overrides: [ { - files: ['*.ts'], + files: ['*.ts', '*.mts'], extends: ['@metamask/eslint-config-typescript'], }, { - files: ['*.js', '*.ts'], + files: ['*.js', '*.ts', '*.mts'], parserOptions: { sourceType: 'script', }, @@ -18,7 +18,7 @@ module.exports = { }, { - files: ['*.mjs'], + files: ['*.mjs', '*.mts'], parserOptions: { sourceType: 'module', ecmaVersion: 2022, diff --git a/jest.config.js b/jest.config.js index 80e4ce81..9c906cdf 100644 --- a/jest.config.js +++ b/jest.config.js @@ -41,10 +41,10 @@ module.exports = { // An object that configures minimum threshold enforcement for coverage results coverageThreshold: { global: { - branches: 49.56, - functions: 55.62, - lines: 56.13, - statements: 56.19, + branches: 60.84, + functions: 62.25, + lines: 65.68, + statements: 65.84, }, }, diff --git a/package.json b/package.json index 130840f5..715f0a3e 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "url": "https://github.com/MetaMask/github-tools.git" }, "scripts": { - "changelog:check": "ts-node src/changelog-check.ts", + "changelog:check": "node --loader ts-node/esm src/changelog-check.mts", "count-references-to-contributor-docs": "ts-node --swc src/scripts/count-references-to-contributor-docs/cli.ts", "gen:commits": "node .github/scripts/generate-rc-commits.mjs", "get-review-metrics": "ts-node src/get-review-metrics.ts", @@ -16,7 +16,7 @@ "lint:constraints": "yarn constraints", "lint:changelog": "auto-changelog validate --prettier", "lint:dependencies": "depcheck && yarn dedupe", - "lint:eslint": "eslint . --cache --ext js,ts && eslint --no-ignore --cache --ext mjs .github/actions/draft-segment-schema-pr", + "lint:eslint": "eslint . --cache --ext js,ts,mts && eslint --no-ignore --cache --ext mjs .github/actions/draft-segment-schema-pr", "lint:fix": "yarn lint:eslint --fix && yarn lint:constraints --fix && yarn lint:misc --write && yarn lint:dependencies", "lint:misc": "prettier '**/*.json' '**/*.md' '**/*.yml' '!.yarnrc.yml' '!.cursor/**' --ignore-path .gitignore --no-error-on-unmatched-pattern", "lint:tsc": "tsc", diff --git a/src/changelog-check.ts b/src/changelog-check.mts similarity index 100% rename from src/changelog-check.ts rename to src/changelog-check.mts diff --git a/tsconfig.json b/tsconfig.json index a6ca900d..25251915 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,11 +4,12 @@ "exactOptionalPropertyTypes": true, "forceConsistentCasingInFileNames": true, "lib": ["ES2022"], - "module": "CommonJS", - "moduleResolution": "node", + "module": "Node16", + "moduleResolution": "Node16", "noEmit": true, "noErrorTruncation": true, "noUncheckedIndexedAccess": true, + "skipLibCheck": true, "strict": true, "target": "es2020" },