-
-
Notifications
You must be signed in to change notification settings - Fork 730
Labels
A-LinterArea: linterArea: linterL-JavaScriptLanguage: JavaScript and super languagesLanguage: JavaScript and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bugStatus: report has been confirmed as a valid bug
Description
Environment information
CLI:
Version: 2.1.1
Color support: true
Platform:
CPU Architecture: aarch64
OS: macos
Environment:
BIOME_LOG_PATH: unset
BIOME_LOG_PREFIX_NAME: unset
BIOME_CONFIG_PATH: unset
BIOME_THREADS: unset
NO_COLOR: unset
TERM: xterm-256color
JS_RUNTIME_VERSION: unset
JS_RUNTIME_NAME: unset
NODE_PACKAGE_MANAGER: unset
Biome Configuration:
Status: Loaded successfully
Path: biome.jsonc
Formatter enabled: true
Linter enabled: true
Assist enabled: true
VCS enabled: true
Linter:
JavaScript enabled: true
JSON enabled: unset
CSS enabled: unset
GraphQL enabled: unset
Recommended: false
Enabled rules:
complexity/noUselessConstructor
correctness/noGlobalObjectCalls
correctness/noInvalidUseBeforeDeclaration
correctness/noUnusedVariables
correctness/useExhaustiveDependencies
correctness/useHookAtTopLevel
correctness/useJsxKeyInIterable
style/noInferrableTypes
style/noRestrictedGlobals
style/noRestrictedImports
style/useConsistentArrayType
style/useConsistentBuiltinInstantiation
style/useConsistentCurlyBraces
style/useConsistentMemberAccessibility
style/useNamingConvention
style/useSelfClosingElements
suspicious/noConsole
suspicious/noDebugger
suspicious/noDuplicateCase
suspicious/noEmptyBlockStatements
suspicious/noFocusedTests
suspicious/noMisleadingInstantiator
suspicious/noSkippedTests
suspicious/noVar
Workspace:
Open Documents: 0Rule name
useExhaustiveDependencies
Playground link
Expected result
function App() {
const firstId = `${Math.random()}`
const secondId = `${Math.random()}`
React.useEffect(() => {
console.log({firstId, secondId})
}, [])
// Fixes to:
React.useEffect(() => {
console.log({firstId, secondId})
}, [{firstId, secondId}])
// Expected:
React.useEffect(() => {
console.log({firstId, secondId})
}, [firstId, secondId])
}Code of Conduct
- I agree to follow Biome's Code of Conduct
Metadata
Metadata
Assignees
Labels
A-LinterArea: linterArea: linterL-JavaScriptLanguage: JavaScript and super languagesLanguage: JavaScript and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bugStatus: report has been confirmed as a valid bug