Skip to content

Commit

Permalink
Trim trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
captbaritone committed Aug 13, 2020
1 parent e0ca072 commit 4dc35db
Showing 1 changed file with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ const tests = {
code: normalizeIndent`
function useFoo(){
const foo = "hi!";
return useMemo(() => foo, [foo]);
return useMemo(() => foo, [foo]);
}
`,
},
Expand Down Expand Up @@ -5797,20 +5797,20 @@ const tests = {
],
},
{
code: normalizeIndent`
function MyComponent(props) {
let handleNext = () => {
console.log('hello');
};
if (props.foo) {
handleNext = () => {
console.log('hello');
};
}
useEffect(() => {
return Store.subscribe(handleNext);
}, [handleNext]);
}
code: normalizeIndent`
function MyComponent(props) {
let handleNext = () => {
console.log('hello');
};
if (props.foo) {
handleNext = () => {
console.log('hello');
};
}
useEffect(() => {
return Store.subscribe(handleNext);
}, [handleNext]);
}
`,
errors: [
{
Expand All @@ -5826,20 +5826,20 @@ const tests = {
{
desc:
"Wrap the construction of 'handleNext' in its own useCallback() Hook.",
output: normalizeIndent`
function MyComponent(props) {
let handleNext = useCallback(() => {
console.log('hello');
});
if (props.foo) {
handleNext = () => {
console.log('hello');
};
}
useEffect(() => {
return Store.subscribe(handleNext);
}, [handleNext]);
}
output: normalizeIndent`
function MyComponent(props) {
let handleNext = useCallback(() => {
console.log('hello');
});
if (props.foo) {
handleNext = () => {
console.log('hello');
};
}
useEffect(() => {
return Store.subscribe(handleNext);
}, [handleNext]);
}
`,
},
],
Expand Down

0 comments on commit 4dc35db

Please sign in to comment.