-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: no-exports-from-components rule, which allowed
getStaticPath
i…
…nstead of `getStaticPaths` (#397) * fix: no-exports-from-components rule, which allowed `getStaticPath` instead of `getStaticPaths` * Create eighty-paws-bake.md
- Loading branch information
Showing
6 changed files
with
13 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"eslint-plugin-astro": patch | ||
--- | ||
|
||
fix: no-exports-from-components rule, which allowed `getStaticPath` instead of `getStaticPaths` |
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
2 changes: 1 addition & 1 deletion
2
tests/fixtures/rules/no-exports-from-components/valid/exceptions-01-input.astro
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
2 changes: 1 addition & 1 deletion
2
tests/fixtures/rules/no-exports-from-components/valid/exceptions-02-input.astro
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
4 changes: 2 additions & 2 deletions
4
tests/fixtures/rules/no-exports-from-components/valid/exceptions-03-input.astro
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,13 +1,13 @@ | ||
--- | ||
// This file is used to test the exceptions for the `no-exports-from-components` rule. | ||
// The following exports are allowed as exceptions. | ||
const getStaticPath = (): { param: unknown }[] => { | ||
const getStaticPaths = (): { param: unknown }[] => { | ||
// logic here | ||
return [] | ||
} | ||
const prerender = true | ||
export { getStaticPath, prerender } | ||
export { getStaticPaths, prerender } | ||
--- | ||
|
||
<div>Hello World</div> |