diff --git a/.changeset/polite-seas-taste.md b/.changeset/polite-seas-taste.md new file mode 100644 index 00000000000..b7ea3220336 --- /dev/null +++ b/.changeset/polite-seas-taste.md @@ -0,0 +1,4 @@ +--- +--- + +chore: move type:check to lint hook diff --git a/apps/docs-snippets/package.json b/apps/docs-snippets/package.json index 58bb894667f..330369511da 100644 --- a/apps/docs-snippets/package.json +++ b/apps/docs-snippets/package.json @@ -4,7 +4,8 @@ "description": "", "private": true, "scripts": { - "pretest": "./scripts/pretest.sh" + "pretest": "./scripts/pretest.sh", + "type:check": "tsc --noEmit" }, "devDependencies": { "@fuel-ts/account": "workspace:*", diff --git a/apps/docs-snippets/scripts/pretest.sh b/apps/docs-snippets/scripts/pretest.sh index 25f1121e8e3..40517df9589 100755 --- a/apps/docs-snippets/scripts/pretest.sh +++ b/apps/docs-snippets/scripts/pretest.sh @@ -9,6 +9,3 @@ pnpm fuels build # Deploys projects (needed for loader bytecode) pnpm fuels deploy - -# Checks for type errors -pnpm tsc --noEmit \ No newline at end of file diff --git a/internal/benchmarks/package.json b/internal/benchmarks/package.json index a8d3873b8ff..f7531e44bb1 100644 --- a/internal/benchmarks/package.json +++ b/internal/benchmarks/package.json @@ -6,7 +6,7 @@ ], "scripts": { "type:check": "tsc --noEmit", - "pretest": "run-s build:forc type:check", + "pretest": "run-s build:forc ", "build:forc": "pnpm fuels build" }, "license": "Apache-2.0", diff --git a/package.json b/package.json index 38e9db8e87c..0f9a9653192 100644 --- a/package.json +++ b/package.json @@ -39,11 +39,12 @@ "clinic:doctor": "clinic doctor --autocannon [ / ] -- node packages/${npm_config_package_name}/dist/profile.js", "clinic:heap": "clinic heapprofiler --autocannon [ / ] -- node packages/${npm_config_package_name}/dist/profile.js", "test:integration": "vitest --run --config vitest.node.config.mts $(scripts/tests-find.sh --integration)", - "lint": "run-s type:check-tests lint:check prettier:check", + "lint": "run-s type:check-tests lint:check prettier:check type:check", "lint:check": "eslint . --ext .ts --max-warnings 0", "lint:fix": "pnpm lint:check --fix", "lint:md-links": "tsx ./scripts/lint-md-links", "lint:package-jsons": "tsx ./scripts/lint-package-jsons", + "type:check": "turbo run type:check", "type:check-tests": "tsc -p tsconfig.test.json", "prettier:check": "prettier --check packages --check apps/docs-snippets", "prettier:format": "prettier --write packages --check apps/docs-snippets", diff --git a/packages/create-fuels/package.json b/packages/create-fuels/package.json index 4ed1df1051e..78783fa6b25 100644 --- a/packages/create-fuels/package.json +++ b/packages/create-fuels/package.json @@ -15,7 +15,7 @@ }, "license": "Apache-2.0", "scripts": { - "build": "run-s build:source type:check", + "build": "run-s build:source", "build:source": "tsup", "type:check": "tsc --noEmit", "prepublishOnly": "tsx ./scripts/prepublish.ts" diff --git a/packages/fuel-gauge/package.json b/packages/fuel-gauge/package.json index c2bbcd48aa5..1c1226118b3 100644 --- a/packages/fuel-gauge/package.json +++ b/packages/fuel-gauge/package.json @@ -5,7 +5,7 @@ "description": "", "author": "Fuel Labs (https://fuel.network/)", "scripts": { - "pretest": "run-s build:forc build:process-predicates type:check", + "pretest": "run-s build:forc build:process-predicates", "build:forc": "pnpm fuels build", "build:process-predicates": "tsx ./scripts/process-predicates.ts", "type:check": "tsc --noEmit" diff --git a/packages/fuels/package.json b/packages/fuels/package.json index 42903a3158a..3684af0eb31 100644 --- a/packages/fuels/package.json +++ b/packages/fuels/package.json @@ -56,7 +56,7 @@ "build:package": "tsup", "build:browser": "pnpm vite build", "build:minified": "pnpm uglifyjs --compress --mangle --output dist/browser.min.mjs -- dist/browser.mjs", - "postbuild": "run-s type:declarations type:check", + "postbuild": "run-s type:declarations", "type:declarations": "tsc --emitDeclarationOnly -p tsconfig.dts.json", "type:check": "tsc --noEmit", "prepublishOnly": "cp ../../README.md ./README.md" diff --git a/turbo.json b/turbo.json index 020ea07d937..0ec6a16078d 100644 --- a/turbo.json +++ b/turbo.json @@ -1,6 +1,9 @@ { "$schema": "https://turborepo.org/schema.json", "tasks": { + "type:check": { + "outputLogs": "errors-only" + }, "preinstall": { "outputLogs": "new-only" },