Skip to content

Commit

Permalink
feat(linter): add noMissingVarFunction (#3779)
Browse files Browse the repository at this point in the history
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
  • Loading branch information
togami2864 and ematipico authored Sep 17, 2024
1 parent deb062e commit e1851e2
Show file tree
Hide file tree
Showing 14 changed files with 835 additions and 93 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_cli/tests/commands/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3266,7 +3266,7 @@ fn no_unused_dependencies() {
"enabled": true,
"rules": {
"all": false,
"nursery": {
"correctness": {
"noUndeclaredDependencies": "error"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ expression: content
"enabled": true,
"rules": {
"all": false,
"nursery": {
"correctness": {
"noUndeclaredDependencies": "error"
}
}
Expand All @@ -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.
Expand All @@ -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 <TIME>. No fixes applied.
Found 1 error.
```
Loading

0 comments on commit e1851e2

Please sign in to comment.