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

🐛 noUndeclaredDependencies doesn't report any diagnostics using biome ci #2819

Closed
1 task done
Conaclos opened this issue May 12, 2024 · 0 comments · Fixed by #2933
Closed
1 task done

🐛 noUndeclaredDependencies doesn't report any diagnostics using biome ci #2819

Conaclos opened this issue May 12, 2024 · 0 comments · Fixed by #2933
Assignees
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@Conaclos
Copy link
Member

Conaclos commented May 12, 2024

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

  • I agree to follow Biome's Code of Conduct
@Conaclos Conaclos added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug labels May 12, 2024
@ematipico ematipico self-assigned this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter 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.

2 participants