Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Unable to save auto-formatting in VSCode #255

Open
1 of 3 tasks
wangyi12358 opened this issue Jul 3, 2024 · 4 comments
Open
1 of 3 tasks

馃悰 Unable to save auto-formatting in VSCode #255

wangyi12358 opened this issue Jul 3, 2024 · 4 comments
Labels
Needs reproduction Needs a reproduction Triage

Comments

@wangyi12358
Copy link

VS Code version

1.90.1

Extension version

2.3.0

Biome version

1.8.3

Operating system

  • Windows
  • macOS
  • Linux

Description

When I press Command + S to save in VSCode, it does not format the file.

biome.json

{
  "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
  "organizeImports": {
    "enabled": true
  },
  "files": {
    "ignore": ["lib", "node_modules"]
  },
  "linter": {
    "enabled": true,
    "ignore": ["lib", "node_modules"],
    "include": ["packages/**"],
    "rules": {
      "style": {
        "noNonNullAssertion": "off"
      },
      "suspicious": {
        "noExplicitAny": "off",
        "noConfusingVoidType": "off"
      },
      "complexity": {
        "noStaticOnlyClass": "off"
      },
      "recommended": true
    }
  },
  "formatter": {
    "enabled": true,
    "attributePosition": "auto",
    "indentStyle": "space",
    "indentWidth": 2,
    "lineWidth": 80,
    "ignore": ["lib", "node_modules"],
    "lineEnding": "lf"
  },
  "javascript": {
    "formatter": {
      "arrowParentheses": "always",
      "bracketSameLine": false,
      "bracketSpacing": true,
      "quoteStyle": "single",
      "jsxQuoteStyle": "single",
      "quoteProperties": "asNeeded",
      "semicolons": "always",
      "trailingCommas": "all"
    },
    "parser": {
      "unsafeParameterDecoratorsEnabled": true
    }
  }
}

.vscode/settings.json

{
  "editor.defaultFormatter": "biomejs.biome",
  "[javascript]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[typescript]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "editor.codeActionsOnSave": {
    "quickfix.biome": "explicit",
    "source.organizeImports.biome": "explicit"
  },
}

Steps to reproduce

  1. Command + S

Expected behavior

Format after saving

Does this issue occur when using the CLI directly?

No

Logs

Biome binary found at /Users/wangyi/vibe/nestjs-modules-repo/node_modules/.pnpm/@biomejs+cli-darwin-arm64@1.8.3/node_modules/@biomejs/cli-darwin-arm64/biome
Copying binary to temporary folder: file:///Users/wangyi/Library/Application%20Support/Code/User/workspaceStorage/111b475946637b58629d8b74394893e5/biomejs.biome/biome
Executing Biome from: /Users/wangyi/Library/Application Support/Code/User/workspaceStorage/111b475946637b58629d8b74394893e5/biomejs.biome/biome
[cli-stdout] data 66
[cli] exit 0
Connecting to "/Users/wangyi/Library/Caches/dev.biomejs.biome/biome-socket-1.8.3" ...
[Info  - 16:11:39] Server initialized with PID: 29379
@ematipico
Copy link
Member

Is the configuration file placed in the root of your repository?

@wangyi12358
Copy link
Author

Is the configuration file placed in the root of your repository?

Yes biome.json is placed in the root directory of my project

@ematipico
Copy link
Member

We'll need a reproduction at this point, would you mind creating one?

@ematipico ematipico added the Needs reproduction Needs a reproduction label Jul 3, 2024
@wangyi12358
Copy link
Author

We'll need a reproduction at this point, would you mind creating one?

https://github.com/vibe-teams/nestjs-modules, pnpm Installation dependence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs reproduction Needs a reproduction Triage
Projects
None yet
Development

No branches or pull requests

2 participants