diff --git a/CHANGELOG.md b/CHANGELOG.md index 7739124eed5e..80a15c009a0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,10 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b ### Linter +#### New features + +- Add [nursery/noMissingVarFunction](https://biomejs.dev/linter/rules/no-missing-var-function). Contributed by @michellocana + ### Parser #### Bug fixes diff --git a/crates/biome_cli/tests/commands/lint.rs b/crates/biome_cli/tests/commands/lint.rs index 2d94067b0a9d..fe207e43d4b9 100644 --- a/crates/biome_cli/tests/commands/lint.rs +++ b/crates/biome_cli/tests/commands/lint.rs @@ -3266,7 +3266,7 @@ fn no_unused_dependencies() { "enabled": true, "rules": { "all": false, - "nursery": { + "correctness": { "noUndeclaredDependencies": "error" } } diff --git a/crates/biome_cli/tests/snapshots/main_commands_lint/no_unused_dependencies.snap b/crates/biome_cli/tests/snapshots/main_commands_lint/no_unused_dependencies.snap index 9b737233f1b8..d88b03abcf3b 100644 --- a/crates/biome_cli/tests/snapshots/main_commands_lint/no_unused_dependencies.snap +++ b/crates/biome_cli/tests/snapshots/main_commands_lint/no_unused_dependencies.snap @@ -10,7 +10,7 @@ expression: content "enabled": true, "rules": { "all": false, - "nursery": { + "correctness": { "noUndeclaredDependencies": "error" } } @@ -37,9 +37,9 @@ import "lodash"; # Termination Message ```block -configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - × Biome exited because the configuration resulted in errors. Please fix them. + × Some errors were emitted while running checks. @@ -48,49 +48,23 @@ configuration ━━━━━━━━━━━━━━━━━━━━━━ # Emitted Messages ```block -biome.json:7:9 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +fix.js:2:8 lint/correctness/noUndeclaredDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - × Found an unknown key `noUndeclaredDependencies`. + × The current dependency isn't specified in your package.json. - 5 │ "all": false, - 6 │ "nursery": { - > 7 │ "noUndeclaredDependencies": "error" - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ - 8 │ } - 9 │ } + 1 │ import "react"; + > 2 │ import "lodash"; + │ ^^^^^^^^ + 3 │ - i Known keys: + i This could lead to errors. - - recommended - - all - - noCommonJs - - noDuplicateCustomProperties - - noDuplicateElseIf - - noDuplicatedFields - - noDynamicNamespaceImportAccess - - noEnum - - noExportedImports - - noIrregularWhitespace - - noProcessEnv - - noRestrictedImports - - noRestrictedTypes - - noSecrets - - noStaticElementInteractions - - noSubstr - - noUnknownPseudoClass - - noUnknownPseudoElement - - noUselessEscapeInRegex - - noValueAtRule - - useAdjacentOverloadSignatures - - useAriaPropsSupportedByRole - - useConsistentCurlyBraces - - useConsistentMemberAccessibility - - useDeprecatedReason - - useImportRestrictions - - useSortedClasses - - useStrictMode - - useTrimStartEnd - - useValidAutocomplete + i Add the dependency in your manifest. ``` + +```block +Checked 1 file in