Skip to content

Commit a3c4772

Browse files
author
Jens Meindertsma
authored
Include all files in Prettier (vercel#17050)
This uses the "Expand directories" feature introduces in Prettier 2.0 to automatically format all supported file types. Also, I fixed some badly formatted files.
1 parent 9959d7e commit a3c4772

File tree

36 files changed

+120
-158
lines changed

36 files changed

+120
-158
lines changed

examples/svg-components/.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"presets": [ "next/babel" ],
3-
"plugins": [ "inline-react-svg" ]
2+
"presets": ["next/babel"],
3+
"plugins": ["inline-react-svg"]
44
}

examples/with-ant-design-less/.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"presets": ["next/babel"],
33
"plugins": [
44
[
5-
"import", {
5+
"import",
6+
{
67
"libraryName": "antd",
78
"style": true
89
}
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
{
2-
"presets": ["next/babel"],
2+
"presets": ["next/babel"],
33
"plugins": [
4-
["import", {
5-
"libraryName": "antd-mobile",
6-
"style": "css"
7-
}]
4+
[
5+
"import",
6+
{
7+
"libraryName": "antd-mobile",
8+
"style": "css"
9+
}
10+
]
811
]
912
}
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"presets": [
3-
"next/babel"
4-
],
2+
"presets": ["next/babel"],
53
"plugins": [
64
[
75
"import",
@@ -11,4 +9,4 @@
119
}
1210
]
1311
]
14-
}
12+
}

examples/with-cssed/.babelrc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
{
2-
"presets": [
3-
"next/babel"
4-
],
5-
"plugins": [
6-
"babel-plugin-macros"
7-
]
2+
"presets": ["next/babel"],
3+
"plugins": ["babel-plugin-macros"]
84
}
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
{
2-
"presets": [
3-
"next/babel"
4-
],
5-
"plugins": [
6-
"@babel/plugin-proposal-do-expressions"
7-
]
2+
"presets": ["next/babel"],
3+
"plugins": ["@babel/plugin-proposal-do-expressions"]
84
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"presets": [
3-
"next/babel"
4-
]
2+
"presets": ["next/babel"]
53
}

examples/with-filbert/.babelrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"presets": ["next/babel"],
3-
"plugins": ["macros"]
4-
}
2+
"presets": ["next/babel"],
3+
"plugins": ["macros"]
4+
}

examples/with-flow/.babelrc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
{
2-
"presets": [
3-
"next/babel"
4-
],
5-
"plugins": [
6-
"transform-flow-strip-types"
7-
]
8-
}
2+
"presets": ["next/babel"],
3+
"plugins": ["transform-flow-strip-types"]
4+
}
Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,40 @@
11
// @flow
22

3-
declare module "next" {
3+
declare module 'next' {
44
declare type NextApp = {
5-
prepare(): Promise<void>;
6-
getRequestHandler(): any;
7-
render(req: any, res: any, pathname: string, query: any): any;
8-
};
5+
prepare(): Promise<void>,
6+
getRequestHandler(): any,
7+
render(req: any, res: any, pathname: string, query: any): any,
8+
}
99
declare module.exports: (...opts: any) => NextApp
1010
}
1111

12-
declare module "next/head" {
13-
declare module.exports: Class<React$Component<any, any>>;
12+
declare module 'next/head' {
13+
declare module.exports: Class<React$Component<any, any>>
1414
}
1515

16-
declare module "next/link" {
17-
declare module.exports: Class<React$Component<{href: string, prefetch?: bool}, any>>;
16+
declare module 'next/link' {
17+
declare module.exports: Class<
18+
React$Component<{ href: string, prefetch?: boolean }, any>
19+
>
1820
}
1921

20-
declare module "next/error" {
21-
declare module.exports: Class<React$Component<{statusCode: number}, any>>;
22+
declare module 'next/error' {
23+
declare module.exports: Class<React$Component<{ statusCode: number }, any>>
2224
}
2325

24-
declare module "next/document" {
25-
declare export var Head: Class<React$Component<any, any>>;
26-
declare export var Main: Class<React$Component<any, any>>;
27-
declare export var NextScript: Class<React$Component<any, any>>;
26+
declare module 'next/document' {
27+
declare export var Head: Class<React$Component<any, any>>
28+
declare export var Main: Class<React$Component<any, any>>
29+
declare export var NextScript: Class<React$Component<any, any>>
2830
declare export default Class<React$Component<any, any>> & {
29-
getInitialProps: (ctx: {pathname: string, query: any, req?: any, res?: any, err?: any}) => Promise<any>;
30-
renderPage(cb: Function): void;
31-
};
31+
getInitialProps: (ctx: {
32+
pathname: string,
33+
query: any,
34+
req?: any,
35+
res?: any,
36+
err?: any,
37+
}) => Promise<any>,
38+
renderPage(cb: Function): void,
39+
}
3240
}

0 commit comments

Comments
 (0)