Skip to content

Commit

Permalink
fixup! [New] Symmetric useState hook variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanbeevers committed Dec 8, 2021
1 parent 292bbbb commit 186578c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/lib/rules/hook-use-state.js
Expand Up @@ -90,25 +90,25 @@ const tests = {
},
{
code: `import { useState } from 'react'
function useState() { // shadows React's useState
return null
}
export default function useColor() {
const result = useState()
function useState() { // shadows React's useState
return null
}
const result = useState()
}`,
features: ['no-default'],
},
{
code: `import React from 'react'
const React = {
useState: () => {
return null
}
}
export default function useColor() {
const React = {
useState: () => {
return null
}
}
const result = React.useState()
}`,
features: ['no-default'],
},
{
code: `import { useState } from 'react'
Expand Down

0 comments on commit 186578c

Please sign in to comment.