biomejs / biome

A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.

Home Page:https://biomejs.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› Potential Bug...?

opened this issue Β· comments

Environment information

CLI:
  Version:                      1.7.2
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.2.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         unset

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

Workspace:
  Open Documents:               0

What happened?

I want to know what happened.

This is my biome.json

{
  "$schema": "https://biomejs.dev/schemas/1.7.0/schema.json",
  "organizeImports": {
    "enabled": true
  },
  "linter": {
    "enabled": true,
    "include": [
      "./src/*.ts",
      "./src/**/*.ts",
      "./types/*.ts",
      "./types/**/*.ts",
      "./scripts/*.ts"
    ],
    "rules": {
      "recommended": true,
      "style": {
        "noDefaultExport": "off",
        "noNonNullAssertion": "off"
      }
    }
  },
  "formatter": {
    "enabled": true,
    "formatWithErrors": true,
    "indentStyle": "space"
  },
  "javascript": {
    "formatter": {
      "bracketSameLine": true,
      "indentStyle": "space"
    }
  },
  "json": {
    "formatter": {
      "trailingCommas": "none"
    }
  }
}

This is my package.json

{
  "name": "puriffy",
  "description": "the cleanest way to build a web service",
  "version": "0.0.1",
  "type": "module",
  "private": true,
  "license": "MIT",
  "homepage": "https://puriffy.dev",
  "main": "./dist/index.js",
  "module": "./dist/index.js",
  "types": "./types/index.ts",
  "keywords": [
    "puriffy",
    "puriffy.js"
  ],
  "files": [
    "dist"
  ],
  "author": {
    "name": "Seol SO",
    "url": "https://fivepixels.dev",
    "email": "hi@fivepixels.dev"
  },
  "funding": {
    "type": "github",
    "url": "https://github.com/sponsors/fivepixels"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/puriffy/puriffy"
  },
  "bugs": {
    "url": "https://github.com/puriffy/puriffy/issues/new",
    "email": "hi@fivepixels.dev"
  },
  "bin": {
    "puriffier": "./src/cli/index.ts"
  },
  "scripts": {
    "build": "bun run ./scripts/build.ts && bun link puriffy",
    "dev": "nodemon  --exec \"bun run build && bun run test\"",
    "dev:server": "nodemon  --exec \"bun run build && puriffier build && bun run ./src/server/index.ts\"",
    "test": "bun test",
    "check": "biome check --apply src types scripts"
  },
  "dependencies": {
    "puriffy": "link:puriffy"
  },
  "devDependencies": {
    "@biomejs/biome": "^1.7.0",
    "@types/bun": "latest",
    "nodemon": "^3.1.0"
  },
  "peerDependencies": {
    "typescript": "^5.0.0"
  },
  "nodemonConfig": {
    "watch": [
      "src",
      "app",
      "scripts",
      "test",
      "puriffied"
    ],
    "ext": "ts"
  }
}

This is my tsconfig.json(if needed in order to fix that bug)

{
  "compilerOptions": {
    // Enable latest features
    "lib": ["ESNext", "DOM"],
    "target": "ESNext",
    "module": "ESNext",
    "moduleDetection": "force",
    "jsx": "react-jsx",
    "allowJs": true,

    // Bundler mode
    "moduleResolution": "bundler",
    "allowImportingTsExtensions": true,
    "verbatimModuleSyntax": true,
    "noEmit": true,
    "declaration": true,

    // Best practices
    "strict": true,
    "skipLibCheck": true,
    "noFallthroughCasesInSwitch": true,

    // Some stricter flags (disabled by default)
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "noPropertyAccessFromIndexSignature": false,

    "outDir": "./dist",

    "paths": {
      "@src/*": ["./src/*"],
      "@test/*": ["./test/*"],
      "@scripts/*": ["./scripts/*"],
      "@type/*": ["./types/*"]
    }
  },
  "include": ["./src", "./types", "./test", "./scripts", "./app"],
  "exclude": ["./node_modules", "**/*.spec.ts"]
}

I just ran the command bun check which will then run the command biome check --apply src types scripts. But, what it says was kind of weird, I would say.

$ biome check --apply src types scripts
Biome encountered an unexpected error

This is a bug in Biome, not an error in your code, and we would appreciate it if you could report it to https://github.com/biomejs/biome/issues/ along with the following information to help us fixing the issue:

Source Location: crates/biome_js_semantic/src/semantic_model/scope.rs:115:33
Thread Name: biome::worker_2
Message: no entry found for key

types/routes/page.ts internalError/panic  INTERNAL  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  βœ– processing panicked: no entry found for key

  ⚠ This diagnostic was derived from an internal Biome error. Potential bug, please report it if necessary.


Checked 33 files in 7ms. No fixes needed

I have no idea what is going on, but it says it is a bug... I mean, if it is a bug and people know it is, then why has it not been fixed yet? Anyway, it told me to make an issue here, so here I am. Also, if you want the sources to see what might be related to the source that biome ran for, you can simply go to this link

Expected result

I basically expected it to run without saying it is a bug, and hopefully, somebody can fix the bug.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

This is a bug we fixed in Biome 1.7.3

I upgraded the version. Thanks!