Code Monkey home page Code Monkey logo

website's Introduction

Synchronize Netlify Status

The website source of biomejs/biome.

Clone

To clone the repository, run

git clone https://github.com/biomejs/website

Installation

First install pnpm by enabling corepack:

corepack enable

Then install the required dependencies:

pnpm i --frozen-lockfile

Local Development

This command starts a local development server:

pnpm start

Most changes are reflected live without having to restart the server.

Code generation

The pages of the lint rules are all code generated from the repository biomejs/biome. To update the pages you have to install the Rust toolchain, because the code that does that requires reading the source code of the analyzer.

First, make sure that you've pulled the latest version of the repository and installed the required toolchains, then run the corresponding scripts from the repo root via pnpm:

# generate only rules files
pnpm codegen:rules

# generate only rules metadata
pnpm codegen:metadata

# generate only release files
pnpm codegen:release-files

# generate all files
pnpm codegen:all

Build

This command generates static content into the dist directory:

pnpm build

The dist directory can be served using any static contents hosting service, or you can preview the site locally with

pnpm preview

website's People

Contributors

angelfire avatar che1ron avatar conaclos avatar damianfrizzi avatar denbezrukov avatar ematipico avatar frodeaa avatar gggchaseggg avatar github-actions[bot] avatar halil-pan avatar honkinggoose avatar ivanesmantovich avatar jake8655 avatar jamiebuilds avatar jeremyhon avatar johnlindquist avatar junaga avatar kesin11 avatar lanker avatar marukome0743 avatar minht11 avatar nemuvski avatar nhedger avatar quanru avatar renovate[bot] avatar rnkln avatar roadsidev avatar sec-ant avatar setchy avatar u1aryz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

๐Ÿ“š `noUndeclaredDependencies` and `useImportType` report issues with output from TypeScript code actions

Documentation URL

https://biomejs.dev/linter/rules/use-import-restrictions/

Description

Using typescript code actions Add missing imports results in code that is reported by biome. I am using the default typescript language server settings.

// biome reports `noUndeclaredDependencies`
import MyModule from "src/main"; // <- this line is auto-generated by "add missing imports"

// biome does not report`noUndeclaredDependencies` when changed to this:
import MyModule from "../main";
// biome reports `useImportType`
import MyModule from "module"; // <- this line is auto-generated by "add missing imports"
// โ€ฆ
let mod: MyModule;

While I think the first can be resolved by changing the typescript configuration to importModuleSpecifierPreference = relative (see here), I am not aware of any typescript setting to deal with the latter. (preferTypeOnlyAutoImports does that, see comment below)

Expectations

That a recommended rule (useImportType) reports output of typescript as an issue is quite irritating, and probably very confusing for less experienced users.

You could argue that this is somewhat a bug of those rules, but technically, the rules work as expected. Possible solutions to this:

A) Change the documentation

  1. Mention that these rules oppose the output of typescript code actions with default settings.
  2. Explain which typescript settings need to be changed to make the output of the code actions comply with biome's rules.

However, 2. is complicated by the fact that there is (to my knowledge) no typescript setting to make typescript add type imports instead of imports. (preferTypeOnlyAutoImports does that, as commented below)

Also, changing typescript configs is not always straightforward. Since tsserver is not "fully" open, users with an editor other than VSCode need to install special language server replacements to be able to configure the typescript.preferences, e.g. typescript tools.

That means: Quite a lot of effort to be able to comply with biome for new users.

B) Change rule behavior

Alternatively, the rule's behavior should be modified to be less strict. noUndeclaredDependencies could be modified to check if an import is simply project-relative, before reporting a violation.

Not sure how to deal with useImportType though. I'd consider demoting it from a recommended to a purely opt-in rule.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ“š Website seems to be down for a long time

Documentation URL

https://biomejs.dev/

Description

Not able to access the site/documentation. This happened earlier also, but got resolved. Now it has been down for quite some time and we are not able to access any documentation.

image image

Expectations

We should be able to access the website securely.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ› Schema for 1.8.0 missing

Environment information

CLI:
  Version:                      1.8.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v21.7.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.7.0"

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. npx @biomejs/biome init generates this biome.json:
    {
        "$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
        "organizeImports": {
     	   "enabled": true
        },
        "linter": {
     	   "enabled": true,
     	   "rules": {
     		   "recommended": true
     	   }
        }
    }
    
  2. The advertised schema links to a 404 page.

Expected result

The schema should be available at the URL generated by npx @biomejs/biome init

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ“š I want to add `--colors=off` option to Lefthook example

Documentation URL

https://biomejs.dev/ja/recipes/git-hooks/

Description

The git error log output by Lefthook outputs ANSI escape code as is, so we need to add an option to display plain text.

> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ ๐ŸฅŠ lefthook v1.7.11  hook: pre-commit โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
sync hooks: โœ”๏ธ (pre-commit)
โ”ƒ  check โฏ 

๏ฟฝ[0m.//src/lib/Foo/Foo.tsx๏ฟฝ[0m๏ฟฝ[0m:๏ฟฝ[0m๏ฟฝ[0m4๏ฟฝ[0m๏ฟฝ[0m:๏ฟฝ[0m๏ฟฝ[0m34๏ฟฝ[0m๏ฟฝ[0m ๏ฟฝ[0m๏ฟฝ[0mparse๏ฟฝ[0m๏ฟฝ[0m ๏ฟฝ[0m๏ฟฝ[0mโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”๏ฟฝ[0m๏ฟฝ[0m
...

Expectations

It took me a little while to get to this information, but wouldn't it be more helpful to include it by default in the Lefthook Example in the Git Hook section?

```yaml title="lefthook.yml"
pre-commit:
  commands:
    check:
      glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
      run: npx @biomejs/biome check --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}

P.S
I was going to make a PR but I didn't have the authority to do so ๐Ÿ˜ฟ.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

process.exit() inside switch/case gives invalid `lint/suspicious/noFallthroughSwitchClause` - conflicting with TypeScript

Environment information

e.g.

switch (getStringProperty(error, 'code')) {
  case 'EACCES':
    console.error(`${bind} requires elevated privileges`);
    process.exit(EXIT_ERROR);
  case 'EADDRINUSE':
    console.error(`${bind} is already in use`);
    process.exit(EXIT_ERROR);
  default:
    throw error;
}

Gives error

error.ts:86:7 lint/suspicious/noFallthroughSwitchClause โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  โœ– This case is falling through to the next case.
  
    84 โ”‚     // handle specific listen errors with friendly messages
    85 โ”‚     switch (getStringProperty(error, 'code')) {
  > 86 โ”‚       case 'EACCES':
       โ”‚       ^^^^^^^^^^^^^^
  > 87 โ”‚         console.error(`${bind} requires elevated privileges`);
  > 88 โ”‚         process.exit(EXIT_ERROR);
       โ”‚         ^^^^^^^^^^^^^^^^^^^^^^^^^
    89 โ”‚       case 'EADDRINUSE':
    90 โ”‚         console.error(`${bind} is already in use`);
  
  โ„น Add a `break` or `return` statement to the end of this case to prevent fallthrough.

However, adding a return or break gives a typescript error saying unreachable code detected.

Rule name

lint/suspicious/noFallthroughSwitchClause

Playground link

https://biomejs.dev/playground/?indentStyle=space&quoteStyle=single&importSortingEnabled=false&code=cwB3AGkAdABjAGgAIAAoAGcAZQB0AFMAdAByAGkAbgBnAFAAcgBvAHAAZQByAHQAeQAoAGUAcgByAG8AcgAsACAAJwBjAG8AZABlACcAKQApACAAewAKACAAIABjAGEAcwBlACAAJwBFAEEAQwBDAEUAUwAnADoACgAgACAAIAAgAGMAbwBuAHMAbwBsAGUALgBlAHIAcgBvAHIAKABgACQAewBiAGkAbgBkAH0AIAByAGUAcQB1AGkAcgBlAHMAIABlAGwAZQB2AGEAdABlAGQAIABwAHIAaQB2AGkAbABlAGcAZQBzAGAAKQA7AAoAIAAgACAAIABwAHIAbwBjAGUAcwBzAC4AZQB4AGkAdAAoAEUAWABJAFQAXwBFAFIAUgBPAFIAKQA7AAoAIAAgAGMAYQBzAGUAIAAnAEUAQQBEAEQAUgBJAE4AVQBTAEUAJwA6AAoAIAAgACAAIABjAG8AbgBzAG8AbABlAC4AZQByAHIAbwByACgAYAAkAHsAYgBpAG4AZAB9ACAAaQBzACAAYQBsAHIAZQBhAGQAeQAgAGkAbgAgAHUAcwBlAGAAKQA7AAoAIAAgACAAIABwAHIAbwBjAGUAcwBzAC4AZQB4AGkAdAAoAEUAWABJAFQAXwBFAFIAUgBPAFIAKQA7AAoAIAAgAGQAZQBmAGEAdQBsAHQAOgAKACAAIAAgACAAdABoAHIAbwB3ACAAZQByAHIAbwByADsACgB9AA%3D%3D

Expected result

It should not display an error

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ› `biome` ignores shared biome config in git hook commands in monorepo

Edit: Referencing this issue for visibility in biomejs/biome#2228 in order to help track down any related issues should this be resolved/supported.


Environment information

CLI:
  Version:                      1.6.3
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.9.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.1.0"

Biome Configuration:
  Status:                       unset

Workspace:
  Open Documents:               0

What happened?

It's a little bit hard to replicate my setup with the playground links due to the shared config package and ci nature.

Example run in ci: https://github.com/exile-watch/nucleus/actions/runs/8441346324/job/23120305017#step:2:252

Here is the shared config: https://github.com/exile-watch/splinters/blob/main/packages/biome-config/biome.json#L30-L34

Here is how it's utilized: https://github.com/exile-watch/nucleus/blob/main/packages/encounter-data/biome.json

And here is a package json that has tabs instead of spaces: https://github.com/exile-watch/nucleus/blob/main/packages/encounter-data/package.json


Locally everything is passing when i go with npm run format or npm run lint but for some reason the ci command fails


Another potential issue I've noticed, though this one is with pre-commit git hooks, is that the recipe command in biomejs.dev site is resetting any format/lint --apply changes (which also gives an indication of somewhat ignoring some rules from shared config)

pre-commit:
  commands:
    check:
      glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
      run: npx biome check --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}

this one in particular, but I can "easily" bypass that by changing the run script to npm run lint so it can respect my shared config

Expected result

I wouldn't expect indent errors to appear in ci.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Cannot access website from Macbook

I cannot access https://biomejs.dev/ from my Macbook. I can from my iPhone and my Windows PC. I'm on my personal network and I don't see any issue with any other sites.

I'm using Arc browser on my Macbook and Windows, Safari on my iPhone. I'm on the same Wifi network for all of them, so I have a feeling its something related. On another Macbook, I wasn't able to access this site either. I'm not using an ad block. My firewall is not active. I'm a bit at a loss!

Please let me know if you need anymore information!

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update dependency @types/react to v18.3.4
  • chore(deps): update dependency vite to v5.4.2
  • chore(deps): update dependency astro to v4.14.5
  • chore(deps): update dependency cm6-graphql to v0.1.0
  • chore(deps): update pnpm to v9.8.0
  • fix(deps): update rust crate pulldown-cmark to 0.12.0
  • chore(deps): update dependency mermaid to v11

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • anyhow 1.0.86
  • bpaf 0.9.12
  • pulldown-cmark 0.10.3
  • schemars 0.8.21
  • serde 1.0.208
  • serde_json 1.0.125
github-actions
.github/actions/run-codegen/action.yaml
  • moonrepo/setup-rust v1.2.1@e013866c4215f77c925f42f60257dec7dd18836e
  • actions/cache v4.0.2@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
  • actions/cache v4.0.2@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
.github/workflows/integrate.yaml
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • biomejs/setup-biome v2.2.1@1cbe33ead22c7a2fded3b52fa2893611c815c9b5
.github/workflows/ja-translation.yaml
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/setup-node v4.0.3@1e60f620b9541d16bece96c5465dc8ee9832be0b
  • pnpm/action-setup v4.0.0@fe02b34f77f8bc703788d5817da081398fad5dd2
  • actions/cache v4.0.2@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
.github/workflows/label-issue.yaml
  • github/issue-labeler 50f02baa9587156323c3ca2c1ed396d220796ba6
.github/workflows/label-pull-request.yaml
  • actions/labeler v5@8558fd74291d67161a8a78ce36a881fa63b766a9
.github/workflows/run-codegen.yaml
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • peter-evans/create-pull-request v6.1.0@c5a7806660adbe173f04e3e038b0ccdcd758773c
.github/workflows/synchronize.yaml
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/setup-node v4.0.3@1e60f620b9541d16bece96c5465dc8ee9832be0b
  • peter-evans/create-pull-request v6.1.0@c5a7806660adbe173f04e3e038b0ccdcd758773c
.github/workflows/update-contributors.yaml
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/setup-node v4.0.3@1e60f620b9541d16bece96c5465dc8ee9832be0b
  • peter-evans/create-pull-request v6.1.0@c5a7806660adbe173f04e3e038b0ccdcd758773c
nodenv
.node-version
npm
package.json
  • @astrojs/netlify 5.5.1
  • @astrojs/prism 3.1.0
  • @astrojs/react 3.6.2
  • @astrojs/rss 4.0.7
  • @astrojs/starlight 0.26.1
  • @biomejs/biome 1.8.3
  • @codemirror/lang-css 6.2.1
  • @codemirror/lang-javascript 6.2.2
  • @codemirror/lang-json 6.0.1
  • @codemirror/lint 6.8.1
  • @codemirror/state 6.4.1
  • @codemirror/view 6.32.0
  • @types/node 20.16.1
  • @types/react 18.3.3
  • @types/react-dom 18.3.0
  • @uiw/react-codemirror 4.23.0
  • @vitejs/plugin-react 4.3.1
  • astro 4.13.3
  • astro-og-canvas 0.5.3
  • autoprefixer 10.4.19
  • canvaskit-wasm 0.39.1
  • cm6-graphql 0.0.15
  • codemirror-lang-rome-ast 0.0.6
  • fast-diff 1.3.0
  • hast-util-to-html 9.0.1
  • hast-util-to-string 3.0.0
  • hastscript 9.0.0
  • html-escaper 3.0.3
  • lang-rome-formatter-ir 0.0.2
  • mdast-util-to-hast 13.2.0
  • mermaid 10.9.1
  • postcss 8.4.39
  • prettier 3.3.3
  • react 18.3.1
  • react-dom 18.3.1
  • rehype-autolink-headings 7.1.0
  • rehype-slug 6.0.0
  • remark-toc 9.0.0
  • sass 1.77.8
  • sharp 0.33.5
  • textlint 14.2.0
  • textlint-rule-preset-jtf-style 2.3.14
  • textlint-rule-prh 6.0.0
  • typescript 5.5.4
  • vite 5.4.1
  • vite-plugin-svgr 4.2.0
  • pnpm 9.6.0
regex
biome.json
  • @biomejs/biome 1.8.3

  • Check this box to trigger a request for Renovate to run again on this repository

noImplicitBoolean does the opposite than linked ESLint rule

Documentation URL

https://biomejs.dev/linter/rules/no-implicit-boolean/

Description

Biome lint/style/noImplicitBoolean does the opposite of the default react/jsx-boolean-value.

Current "Same as: react/jsx-boolean-value" is misleading as the default behavior of the ESLint rule is about removing the implicit values and lint/style/noImplicitBoolean has no way to achieve it.

Expectations

Do not say it is "same as".

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Add lint rule flags to the rule detail page

Description

Not an issue, more of a documentation feature request.

In the lint rules listing, every rule has flags about stability and if fixable or not (https://biomejs.dev/linter/rules/), example:

image

but the rule detail page is missing the information, example:

image

Expectations

We have strong control over every configuration in the project so when new Biome version is released, we go through the changelog and evaluate every new rule. Right now, we have to find every rule in the listing to see those flags. It would be great to have those icons in the rule detail page too ๐Ÿ™‚

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ“š Rules section should allow filtering

Documentation URL

https://biomejs.dev/linter/rules/

Description

Most users will use recommended preset, discovering what other rules might be useful would require going to a site and manually filtering which rules are not enabled by default. Making it hard to keep up, especially after new version releases.

Expectations

Likely something similar how to typescript-eslint allows to filter rules based on categories.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Display Biome and Prettier versions in the playground

Display Biome and Prettier versions in the playground so we can have a clear understanding and expection of their behaviors.

  • For Biome, the version is the commit hash and a user can click it to browse that specific commit in the biomejs/biome repo.
  • For Prettier, we use its release version.

๐Ÿ“š New `no-evolving-any` rule documentation lacks proper examples and/or references

Documentation URL

https://biomejs.dev/linter/rules/no-evolving-any

Description

Follow up on biomejs/biome#1883 biomejs/biome#2112

The docs currently state that evolving types may lead to variables with an any type, but lack any sort of examples which demonstrate this. It is also stated that evolving any disables many type-checking rules, also without any examples or references.

Expectations

What are the exact caveats of using evolving any? What are the examples?

From what I know, evolving any doesn't turn into any if not explicitly assigned as such. Just like it doesn't disable many type-checking rules. I might be wrong, but the docs lack any proofs or references.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

"use strict"; -- document how to convince biomejs that a file is not a module?

Documentation URL

https://biomejs.dev/linter/rules/no-redundant-use-strict/

Description

the noRedundantUseStrict shows removing redundant strict -- and the biome playground allows for both "Module" and "Script" forms -- but I can't find how to configure that from the cli and so I am always getting a diagnostic for removal of 'use strict';

Expectations

it may be nice to show how to teach biome that these are scripts and not modules -- perhaps in the noRedundantUseStrict docs as well since that's where it is relevant to me!

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ“š Linter rules properties: I can't remember the icon labels

Documentation URL

https://biomejs.dev/linter/rules/

Description

At the very top of the page, it explains what each icon means what:

Below the list of rules supported by Biome, divided by group. Hereโ€™s a legend of the emojis:

  • The icon check icon indicates that the rule is part of the recommended rules.
  • The icon gear icon indicates that the rule provides a code action (fix) that is safe to apply.
  • The icon warning icon indicates that the rule provides a code action (fix) that is unsafe to apply.
  • The icon JS icon indicates that the rule is applied to JavaScript and super languages files.
  • The icon TS icon indicates that the rule is applied to TypeScript and TSX files.
  • The icon brace icon indicates that the rule is applied to JSON files.
  • The icon hash icon indicates that the rule is applied to CSS files.

But this page is too long; scrolling little bit I forgot what gear icon stands for, more scrolling I forgot what hash icon stands for, and after the half of the doc only I can remember was JS icon and TS icon. There's no mouseover tooltip in icons, so I have to scroll back to the top.

Expectations

One could be a tooltip, like moving from existing aria-label to title:

<span class="inline-icon" title="The rule has a safe fix" role="img">
  <Icon name="seti:config" />
</span>

Or one could be a text label instead of icons, for clear meaning. I think it can be short enough to label as a text.

<td>
  <span class="badge">Recommended</span>
  <span class="badge">Safe fix</span>
  <span class="badge">CSS</span>
</td>

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ“š Incorrect initialization command for Bun

Documentation URL

https://biomejs.dev/guides/getting-started/#configuration

Description

After following the documentation guide for Bun, when running bunx @biomejs/biome init, an error occurred stating error: Script not found "@biomejs/biome".

โฏ bun add --dev --exact @biomejs/biome
bun add v1.1.18 (5a0b9352)

$ bun run sync
$ bunx --bun svelte-kit sync

installed @biomejs/[email protected] with binaries:
 - biome

[1243.00ms] done

โฏ bunx @biomejs/biome init
error: Script not found "@biomejs/biome"

I think the correct command to use is bunx biome init.

โฏ bunx biome init

Welcome to Biome! Let's get you started...

Files created 

  - biome.json
    Your project configuration. See https://biomejs.dev/reference/configuration

Next Steps 

  1. Setup an editor extension
     Get live errors as you type and format when you save.
     Learn more at https://biomejs.dev/guides/integrate-in-editor/

  2. Try a command
     biome check  checks formatting, import sorting, and lint rules.
     biome --help displays the available commands.

  3. Migrate from ESLint and Prettier
     biome migrate eslint   migrates your ESLint configuration to Biome.
     biome migrate prettier migrates your Prettier configuration to Biome.

  4. Read the documentation
     Find guides and documentation at https://biomejs.dev/guides/getting-started/

  5. Get involved with the community
     Ask questions and contribute on GitHub: https://github.com/biomejs/biome
     Seek for help on Discord: https://discord.gg/BypW39g6Yc

Expectations

Should not output error.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ“š fix/typo-japanese-reference

Documentation URL

https://biomejs.dev/ja/reference/configuration/

Description

miss typo VSCใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆ

path: src/content/docs/ja/reference/configuration.mdx Line 128

Expectations

Correct typo VCSใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆ

path: src/content/docs/ja/reference/configuration.mdx Line 128

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Renovate Preset - automated biome.json $schema updates

Documentation URL

https://biomejs.dev/guides/getting-started/

Description

I recently contributed a new regex preset to Renovate to assist with automating the $schema version inline with the biomejs npm releases.

renovatebot/renovate#28537

Expectations

Consider documenting how mutual users of biome and renovate can use this preset

Preset documentation: https://docs.renovatebot.com/presets-regexManagers/#regexmanagersbiomeversions

Example configuration

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": ["config:recommended", "regexManagers:biomeVersions"]
}

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ“š Add clarification on the differences between `biome check` and `biome ci`

Documentation URL

https://biomejs.dev/reference/cli/

Description

biome check and biome ci commands are quite similar, which could lead to confusion among users.

Expectations

To help clarify, it would be useful to explicitly describe the distinct use cases or benefits of each command. For example, indicating if biome ci command offers diagnostic outputs on GitHub would be particularly helpful. This would assist users in making more informed choices between the two commands.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ“š Incorrect documentation for the rule "use-import-extensions"

Documentation URL

https://biomejs.dev/linter/rules/use-import-extensions/

Description

make sure to enable allowImportingTsExtensions=true in your tsconfig.json.

This seems to be an incorrect statement, as allowImportingTsExtensions no longer is useful due to explicit extension mapping support, and it never was super useful to begin with, as it was blocking emission of transpiled code, so referring to it is more confusing than helpful.

Rule does not yet check filesystem for file type. It tries to guess which extension it should add based on the file extension of the current file and the import path.

Caveat seems both redundant and also confusing, having in mind that "Options" section explains both the default and the option to provide mapping manually, while caveat only refers to the default behaviour.

Expectations

Documentation doesn't contain redundant or confusing descriptions.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ“š update for `--write`, `--fix`, `--unsafe` options and deprecation of `--apply` and `--apply-unsafe`

Documentation URL

https://biomejs.dev/reference/cli

Description

I created PRs

  • to add --write, --fix, --unsafe options to fixable commands.
  • to deprecate --apply and --apply-unsafe options of biome <check|lint>

The website documentation should be updated for the change.

Expectations

The page should reflect the actual command options.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ“š Remove outdated differences with Prettier

Documentation URL

https://biomejs.dev/formatter/differences-with-prettier/

Description

Some documented differences with Prettier are no longer differences because Prettier's behavior changed in the meantime:

Prettier doesnโ€™t unquote some object properties that are valid JavaScript identifiers

โœ”๏ธ Still correct
Code example in Prettier Playground | Code example in Biome Playground

Prettier has an inconsistent behavior for assignment in computed keys.

โœ”๏ธ Still correct
Code example in Prettier Playground | Code example in Biome Playground

Prettier adds a trailing comma to type parameters of arrow functions even when it is not required.

โœ”๏ธ Still correct
Code example in Prettier Playground | Code example in Biome Playground

Prettier has an inconsistent behavior for parenthesized non-null-asserted optional chains

โš ๏ธ Prettier throws an error now about the invalid syntax
Code example in Prettier Playground | Code example in Biome Playground

Prettier formats invalid syntaxes โ€“ Duplicate modifiers on class properties

โš ๏ธ Prettier throws an error now about the invalid syntax
Code example in Prettier Playground | Code example in Biome Playground

Prettier formats invalid syntaxes โ€“ Assignment to an optional chain

โœ”๏ธ Still correct
Code example in Prettier Playground | Code example in Biome Playground

Prettier formats invalid syntaxes โ€“ Incorrect modifier for the type parameters of an interface

โœ”๏ธ Still correct
Code example in Prettier Playground | Code example in Biome Playground

Prettier formats invalid syntaxes โ€“ Top-level return

โœ”๏ธ Still correct
Code example in Prettier Playground | Code example in Biome Playground

Prettier formats invalid syntaxes โ€“ Erroneous self-increment and self-decrement

โš ๏ธ Prettier throws an error now about the invalid syntax
Code example in Prettier Playground | Code example in Biome Playground

Prettier formats invalid syntaxes โ€“ Use of abstract modifier in non-abstract classes

โœ”๏ธ Still correct
Code example in Prettier Playground | Code example in Biome Playground

Prettier has inconsistencies between TypeScript and Babel parsing

โš ๏ธ Prettier formats the code consistently now with the babel/babel-ts/typescript parsers
Code example in Prettier Playground | Code example in Biome Playground

Expectations

For all differences with a โœ”๏ธ:

  • These are fine, so nothing to change here.

For all differences with a โš ๏ธ:

  • Either the issue is fixed in Prettier completely, then there is no difference between Biome's and Prettier's behavior anymore, so the corresponding section should be removed from the docs.
  • Or the issue is only partially fixed in Prettier (at least for the documented code example), but still persists for other code examples. Then the documentation should be updated to include a code example that actually highlights the difference between Biome's and Prettier's behavior.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

๐Ÿ“š use-valid-autocomplete page is not found

Documentation URL

https://biomejs.dev/linter/rules/use-valid-autocomplete

Description

When I click on the useValidAutocomplete link from the https://biomejs.dev/ja/linter/rules-sources/#eslint-plugin-jsx-a11y page, I get a 404.

Expectations

It seems that the rule has already been added in feat(lint/useValidAutocomplete): add rule, so use-valid-autocomplet.md file and documentation should be created.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

noDebugger Rule Documentation Links to Localhost Instead of Relative Path

Documentation URL

https://biomejs.dev/linter/#rules

Description

The documentation page for the noDebugger rule currently links to a local development environment URL. This link should be relative instead of absolute

Wrong link: http://localhost:4321/linter/rules/no-debugger

Expectations

Expectations

The link in the Linter Rules documentation should be a relative path, ensuring it is functional regardless of the environment in which the documentation is viewed.

Expected link: https://biomejs.dev/linter/rules/no-debugger/

Code of Conduct

  • I agree to follow Biome's Code of Conduct

noDangerouslySetInnerHtml and noDangerouslySetInnerHtmlWithChildren links wrong ESLint rules

Documentation URL

https://biomejs.dev/linter/rules/no-dangerously-set-inner-html
https://biomejs.dev/linter/rules/no-dangerously-set-inner-html-with-children

Description

Those two have switched the ESLint rule they refer to. It should say that rule lint/security/noDangerouslySetInnerHtml is the same as react/no-danger, and rule lint/security/noDangerouslySetInnerHtmlWithChildren is the same as react/no-danger-with-children

Expectations

Lint descriptions match the ESLint rules.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Add CODEOWNERS

Add a CODEOWNERS file to reference language specific teams

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.