Skip to content

Commit 4dc35db

Browse files
committed
Trim trailing whitespace
1 parent e0ca072 commit 4dc35db

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ const tests = {
13871387
code: normalizeIndent`
13881388
function useFoo(){
13891389
const foo = "hi!";
1390-
return useMemo(() => foo, [foo]);
1390+
return useMemo(() => foo, [foo]);
13911391
}
13921392
`,
13931393
},
@@ -5797,20 +5797,20 @@ const tests = {
57975797
],
57985798
},
57995799
{
5800-
code: normalizeIndent`
5801-
function MyComponent(props) {
5802-
let handleNext = () => {
5803-
console.log('hello');
5804-
};
5805-
if (props.foo) {
5806-
handleNext = () => {
5807-
console.log('hello');
5808-
};
5809-
}
5810-
useEffect(() => {
5811-
return Store.subscribe(handleNext);
5812-
}, [handleNext]);
5813-
}
5800+
code: normalizeIndent`
5801+
function MyComponent(props) {
5802+
let handleNext = () => {
5803+
console.log('hello');
5804+
};
5805+
if (props.foo) {
5806+
handleNext = () => {
5807+
console.log('hello');
5808+
};
5809+
}
5810+
useEffect(() => {
5811+
return Store.subscribe(handleNext);
5812+
}, [handleNext]);
5813+
}
58145814
`,
58155815
errors: [
58165816
{
@@ -5826,20 +5826,20 @@ const tests = {
58265826
{
58275827
desc:
58285828
"Wrap the construction of 'handleNext' in its own useCallback() Hook.",
5829-
output: normalizeIndent`
5830-
function MyComponent(props) {
5831-
let handleNext = useCallback(() => {
5832-
console.log('hello');
5833-
});
5834-
if (props.foo) {
5835-
handleNext = () => {
5836-
console.log('hello');
5837-
};
5838-
}
5839-
useEffect(() => {
5840-
return Store.subscribe(handleNext);
5841-
}, [handleNext]);
5842-
}
5829+
output: normalizeIndent`
5830+
function MyComponent(props) {
5831+
let handleNext = useCallback(() => {
5832+
console.log('hello');
5833+
});
5834+
if (props.foo) {
5835+
handleNext = () => {
5836+
console.log('hello');
5837+
};
5838+
}
5839+
useEffect(() => {
5840+
return Store.subscribe(handleNext);
5841+
}, [handleNext]);
5842+
}
58435843
`,
58445844
},
58455845
],

0 commit comments

Comments
 (0)