biome icon indicating copy to clipboard operation
biome copied to clipboard

๐Ÿ› `noUndeclaredDependencies` doesn't report any diagnostics using `biome ci`

Open Conaclos opened this issue 9 months ago โ€ข 0 comments

Environment information

CLI:
  Version:                      1.7.3
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "foot"
  JS_RUNTIME_VERSION:           "v21.7.3"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.5.2"

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

Workspace:
  Open Documents:               0

What happened?

โฏ npm init --yes
โฏ npm i -D @biomejs/biome
โฏ cat biome.json
{
	"linter": {
		"rules": {
			"recommended": false,
			"nursery": {
				"noUndeclaredDependencies": "error"
			}
		}
	}
}

โฏ cat index.js
import "a";

โฏ npx biome ci index.js 
Checked 1 file in 475ยตs. No fixes needed.

โฏ npx biome lint index.js 
index.js:1:8 lint/nursery/noUndeclaredDependencies โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  โœ– The current dependency isn't specified in your package.json.
  
  > 1 โ”‚ import "a";
      โ”‚        ^^^
    2 โ”‚ 
  
  โ„น This could lead to errors.
  
  โ„น Add the dependency in your manifest.
  

Checked 1 file in 652ยตs. No fixes needed.
Found 1 error.
lint โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  โœ– Some errors were emitted while running checks.

Note: executing biome check yields the same result as biome lint.

Expected result

biome ci should emit the same diagnostic as biome lint.

Code of Conduct

  • [X] I agree to follow Biome's Code of Conduct

Conaclos avatar May 12 '24 10:05 Conaclos