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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Overriding javascript globals overrides formatter defaults #1190

Closed
1 task done
anonrig opened this issue Dec 14, 2023 · 2 comments · Fixed by #1278
Closed
1 task done

🐛 Overriding javascript globals overrides formatter defaults #1190

anonrig opened this issue Dec 14, 2023 · 2 comments · Fixed by #1278
Labels
A-Project Area: project L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@anonrig
Copy link
Contributor

anonrig commented Dec 14, 2023

Environment information

CLI:
  Version:                      1.4.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "alacritty"
  JS_RUNTIME_VERSION:           "v20.10.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.2.3"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Workspace:
  Open Documents:               0

What happened?

  1. Clone GitHub.com/getsentry/sentry-javascript
  2. Add the following overrides to biome.json
"overrides": [
    {
      "include": ["packages/*/test/**/*.test.ts"],
      "javascript": {
        "globals": ["expect", "describe", "test", "it", "beforeEach", "afterEach", "beforeAll", "afterAll"]
      }
    }
  ]
  1. Run yarn lint:biome

Expected result

It shouldn't replace space based indentation with tabs.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@anonrig anonrig changed the title 🐛 Overriding javascript globals disables formatter 🐛 Overriding javascript globals overrides formatter defaults Dec 14, 2023
@anonrig
Copy link
Contributor Author

anonrig commented Dec 14, 2023

Updating the overrides with the following fixes the issue:

"overrides": [
    {
      "include": ["packages/*/test/**/*.test.ts"],
      "javascript": {
        "globals": ["expect", "describe", "test", "it", "beforeEach", "afterEach", "beforeAll", "afterAll"]
      },
      "formatter": {
        "enabled": true,
        "formatWithErrors": true,
        "indentStyle": "space",
        "indentWidth": 2,
        "lineWidth": 120
      }
    }
  ]

@Conaclos Conaclos added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Enhancement Status: Improve an existing feature labels Dec 14, 2023
@ematipico ematipico added S-Bug-confirmed Status: report has been confirmed as a valid bug A-Project Area: project and removed S-Enhancement Status: Improve an existing feature A-Linter Area: linter labels Dec 21, 2023
@ematipico
Copy link
Member

Closed by #1278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Project Area: project L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants