-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(examples): use default prettier for examples/templates (#60530)
## Description This PR ensures that the default prettier config is used for examples and templates. This config is compatible with `prettier@3` as well (upgrading prettier is bigger change that can be a future PR). ## Changes - Updated `.prettierrc.json` in root with `"trailingComma": "es5"` (will be needed upgrading to prettier@3) - Added `examples/.prettierrc.json` with default config (this will change every example) - Added `packages/create-next-app/templates/.prettierrc.json` with default config (this will change every template) ## Related - Fixes #54402 - Closes #54409
- Loading branch information
Showing
2,559 changed files
with
21,386 additions
and
21,311 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"semi": false | ||
} |
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 @@ | ||
{ | ||
"trailingComma": "all", | ||
"singleQuote": false, | ||
"semi": true | ||
} |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import { useRouter } from 'next/router' | ||
import Nav from '../components/Nav' | ||
import { useRouter } from "next/router"; | ||
import Nav from "../components/Nav"; | ||
|
||
const SlugPage = () => { | ||
const { asPath } = useRouter() | ||
const { asPath } = useRouter(); | ||
return ( | ||
<> | ||
<Nav /> | ||
<p>Hello, I'm the {asPath} page</p> | ||
</> | ||
) | ||
} | ||
); | ||
}; | ||
|
||
export default SlugPage | ||
export default SlugPage; |
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,10 +1,10 @@ | ||
import Nav from '../components/Nav' | ||
import Nav from "../components/Nav"; | ||
|
||
const AboutPage = () => ( | ||
<> | ||
<Nav /> | ||
<p>Hello, I'm the about page</p> | ||
</> | ||
) | ||
); | ||
|
||
export default AboutPage | ||
export default AboutPage; |
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,10 +1,10 @@ | ||
import Nav from '../components/Nav' | ||
import Nav from "../components/Nav"; | ||
|
||
const IndexPage = () => ( | ||
<> | ||
<Nav /> | ||
<p>Hello, I'm the index page</p> | ||
</> | ||
) | ||
); | ||
|
||
export default IndexPage | ||
export default IndexPage; |
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,10 +1,10 @@ | ||
import Nav from '../components/Nav' | ||
import Nav from "../components/Nav"; | ||
|
||
const News = () => ( | ||
<> | ||
<Nav /> | ||
<p>Hello, I'm the news page</p> | ||
</> | ||
) | ||
); | ||
|
||
export default News | ||
export default News; |
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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export default function NormalPage() { | ||
return <p>I'm just a normal old page, no AMP for me</p> | ||
return <p>I'm just a normal old page, no AMP for me</p>; | ||
} |
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,10 +1,10 @@ | ||
const withBundleAnalyzer = require('@next/bundle-analyzer')({ | ||
enabled: process.env.ANALYZE === 'true', | ||
}) | ||
const withBundleAnalyzer = require("@next/bundle-analyzer")({ | ||
enabled: process.env.ANALYZE === "true", | ||
}); | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
// any configs you need | ||
} | ||
}; | ||
|
||
module.exports = withBundleAnalyzer(nextConfig) | ||
module.exports = withBundleAnalyzer(nextConfig); |
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,5 +1,5 @@ | ||
const About = () => { | ||
return <div>About us</div> | ||
} | ||
return <div>About us</div>; | ||
}; | ||
|
||
export default About | ||
export default About; |
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,5 +1,5 @@ | ||
const Contact = () => { | ||
return <div>This is the contact page.</div> | ||
} | ||
return <div>This is the contact page.</div>; | ||
}; | ||
|
||
export default Contact | ||
export default Contact; |
Oops, something went wrong.