-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(linter): update eslint plugins for @typescript-eslint v6 naming (n…
…rwl#21221) Co-authored-by: Steven Rathbauer <[email protected]> Co-authored-by: James Henry <[email protected]>
- Loading branch information
1 parent
b5ffb85
commit 4700df6
Showing
9 changed files
with
68 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,6 @@ export function Index() { | |
<%- appContent %> | ||
</<%= wrapper %>> | ||
); | ||
}; | ||
} | ||
|
||
export default Index; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 15 additions & 15 deletions
30
packages/react/src/generators/hook/files/__fileName__.ts__tmpl__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import { useState, useCallback } from 'react' | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface <%= hookTypeName %> { | ||
count: number; | ||
increment: () => void; | ||
} | ||
export function <%= hookName %>(): <%= hookTypeName %> { | ||
const [count, setCount] = useState(0) | ||
const increment = useCallback(() => setCount((x) => x + 1), []) | ||
return { count, increment } | ||
}; | ||
export default <%= hookName %>; | ||
import { useState, useCallback } from 'react' | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface <%= hookTypeName %> { | ||
count: number; | ||
increment: () => void; | ||
} | ||
|
||
export function <%= hookName %>(): <%= hookTypeName %> { | ||
const [count, setCount] = useState(0) | ||
const increment = useCallback(() => setCount((x) => x + 1), []) | ||
return { count, increment } | ||
} | ||
|
||
export default <%= hookName %>; |