Typescript build fails due to format

What happens

When I run (locally) build_solutions_typescript it fails:

What do you understand or find about that problem

I see in the pipeline that says

Checking formatting...
root/src/paolagiraldo.tsroot/src/paolagiraldo.ts
Code style issues found in the above file(s). Forgot to run Prettier?
[ERROR] Please run prettier on your solution with config:
/nix/store/jf14vyvjfqlfsbnxw6v2f9zfibf7vcws-prettier-generic.yaml
builder for '/nix/store/kx5zaiq91d04zjxvbw80vqfmh6mjl2ib-codecodeabbey130paolagiraldo.ts.drv' failed with exit code 1
error: build of '/nix/store/kx5zaiq91d04zjxvbw80vqfmh6mjl2ib-codecodeabbey130paolagiraldo.ts.drv' failed
parallel: This job failed:
helper_build_solution code/codeabbey/130/paolagiraldo.ts build/builders/solutions/typescript

You make any workaround? What did you do?

Then I run prettier --config .prettierrc '*.ts' --write to check the format whit

.prettierrrc:

{
  "printWidth": 80,
  "tabWidth": 2,
  "useTabs": false,
  "semi": true,
  "singleQuote": true,
  "quoteProps": "consistent",
  "jsxSingleQuote": true,
  "trailingComma": "es5",
  "bracketSpacing": false,
  "jsxBracketSameLine": false,
  "arrowParens": "always"
  }

(Optional) Why fails your workaround?

Run again the bluid for typescript and got:

/run/user/1000/nix-build-codecodeabbey130paolagiraldo.ts.drv-0/root/src/paolagiraldo.ts
  23:5   error  A space is required after '{'   object-curly-spacing
  23:41  error  A space is required before '}'  object-curly-spacing

✖ 2 problems (2 errors, 0 warnings)
  2 errors and 0 warnings potentially fixable with the `--fix` option.

builder for '/nix/store/bpypxpafgfcgzyj6z3b1wrlp04ck5n94-codecodeabbey130paolagiraldo.ts.drv' failed with exit code 1
error: build of '/nix/store/bpypxpafgfcgzyj6z3b1wrlp04ck5n94-codecodeabbey130paolagiraldo.ts.drv' failed
parallel: This job failed:
helper_build_solution code/codeabbey/130/paolagiraldo.ts build/builders/solutions/typescript

I Add this spaces, and go into a inifinite loop :arrow_up:

All this, when running the build locally before push the commit

I need help with

I don’t know why the pipeline fails and I try to make workarounds but didn’t work, what I should do to fix this.

This seems to be an error related to an incompatibility with some rules between Eslint and Prettier:

Prettier => "bracketSpacing": false,

And you can see that Eslint says that you need a space after and before, the fix is in process, wait until is merged after that please rebase and try again.

@Black-Moon

The issue was fixed with this MR, please rebase and try again, you can tell me if that solve your problem.

1 Like