Skip to content

Commit 9b3bd73

Browse files
prettier fix for next-swc (vercel#47873)
This enables the existing prettier config to auto apply to code inside the `next-swc` package
1 parent 191acdf commit 9b3bd73

File tree

460 files changed

+4204
-4208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

460 files changed

+4204
-4208
lines changed

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ lerna.json
1313
.github/actions/next-stats-action/.work
1414
.github/actions/issue-validator/index.mjs
1515
.github/actions/issue-labeler/lib/index.js
16-
packages/next-swc/crates/**/*
16+
packages/next-swc/crates/next-core/js/src/compiled/**/*
17+
packages/next-swc/crates/**/tests/**/output*
1718
packages/next-swc/target/**/*
1819
packages/next-swc/native/**/*
1920
packages/next-codemod/transforms/__testfixtures__/**/*

packages/next-swc/crates/core/tests/errors/next-dynamic/too-many-arguments/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import dynamic from 'next/dynamic'
33
const DynamicComponentWithCustomLoading = dynamic(
44
() => import('../components/hello'),
55
{ loading: () => <p>...</p> },
6-
"3rd"
6+
'3rd'
77
)
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import dynamic from 'next/dynamic'
2-
3-
const DynamicComponentWithCustomLoading = dynamic(
4-
() => import('../components/hello'),
5-
{ loading: () => <p>...</p> },
6-
"3rd"
7-
)
1+
import dynamic from 'next/dynamic';
2+
const DynamicComponentWithCustomLoading = dynamic(()=>import('../components/hello'), {
3+
loading: ()=><p>...</p>
4+
}, '3rd');
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
const getStaticProps = async () => {}
2-
export { a as getServerSideProps }
3-
2+
export { a as getServerSideProps }

packages/next-swc/crates/core/tests/errors/next-ssg/server-side-after-static-props/output.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps
33
,-[input.js:1:1]
44
1 | const getStaticProps = async () => {}
5-
2 | export { a as getServerSideProps }
5+
2 | export { a as getServerSideProps }
66
: ^^^^^^^^^^^^^^^^^^
77
`----
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
export { a as getServerSideProps } from './input'
22
export { getStaticPaths } from 'a'
3-
4-
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// This is a comment.
22

3-
"use strict";
3+
'use strict'
44

55
/**
66
* This is a comment.
77
*/
88

9-
import "client-only"
9+
import 'client-only'
1010

1111
export default function () {
12-
return null;
12+
return null
1313
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// This is a comment.
2-
"use strict";
2+
'use strict';
33
/**
44
* This is a comment.
5-
*/ import "client-only";
5+
*/ import 'client-only';
66
export default function() {
77
return null;
88
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
export function getServerSideProps (){
2-
}
1+
export function getServerSideProps() {}
32

43
export default function () {
5-
return null;
4+
return null
65
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
x NEXT_RSC_ERR_INVALID_API: getServerSideProps
33
,-[input.js:1:1]
4-
1 | export function getServerSideProps (){
4+
1 | export function getServerSideProps() {}
55
: ^^^^^^^^^^^^^^^^^^
6-
2 | }
76
`----

0 commit comments

Comments
 (0)