Skip to content

Commit 5628a84

Browse files
authored
Unify check and formatting in one place (rescript-lang#7221)
Whenever I edit js files and run `make format` the js files are not formatted
1 parent 4982266 commit 5628a84

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

scripts/format.sh

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ dune build @fmt --auto-promote
66

77
files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*" ! -path "tests/syntax_*" ! -path "tests/analysis_tests/tests*" ! -path "tests/gentype_tests/typescript-react-example/node_modules")
88
./cli/rescript format $files
9+
10+
npm run format

scripts/format_check.sh

+2
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ case "$(uname -s)" in
3030
echo "Code formatting checks skipped for this platform."
3131
esac
3232

33+
echo "Biome format check"
34+
npm run checkFormat

scripts/test.js

-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ if (process.argv.includes("-all")) {
4444

4545
async function runTests() {
4646
if (formatTest) {
47-
cp.execSync("npm run checkFormat", {
48-
cwd: path.join(__dirname, ".."),
49-
stdio: [0, 1, 2],
50-
});
51-
5247
cp.execSync("bash scripts/format_check.sh", {
5348
cwd: path.join(__dirname, ".."),
5449
stdio: [0, 1, 2],

0 commit comments

Comments
 (0)