Unverified Commit a3c47721 authored by Jens Meindertsma's avatar Jens Meindertsma Committed by GitHub

Include all files in Prettier (#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.
parent 9959d7ef
{ {
"presets": [ "next/babel" ], "presets": ["next/babel"],
"plugins": [ "inline-react-svg" ] "plugins": ["inline-react-svg"]
} }
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
"presets": ["next/babel"], "presets": ["next/babel"],
"plugins": [ "plugins": [
[ [
"import", { "import",
{
"libraryName": "antd", "libraryName": "antd",
"style": true "style": true
} }
......
{ {
"presets": ["next/babel"], "presets": ["next/babel"],
"plugins": [ "plugins": [
["import", { [
"libraryName": "antd-mobile", "import",
"style": "css" {
}] "libraryName": "antd-mobile",
"style": "css"
}
]
] ]
} }
{ {
"presets": [ "presets": ["next/babel"],
"next/babel"
],
"plugins": [ "plugins": [
[ [
"import", "import",
...@@ -11,4 +9,4 @@ ...@@ -11,4 +9,4 @@
} }
] ]
] ]
} }
\ No newline at end of file
{ {
"presets": [ "presets": ["next/babel"],
"next/babel" "plugins": ["babel-plugin-macros"]
],
"plugins": [
"babel-plugin-macros"
]
} }
{ {
"presets": [ "presets": ["next/babel"],
"next/babel" "plugins": ["@babel/plugin-proposal-do-expressions"]
],
"plugins": [
"@babel/plugin-proposal-do-expressions"
]
} }
{ {
"presets": [ "presets": ["next/babel"]
"next/babel"
]
} }
{ {
"presets": ["next/babel"], "presets": ["next/babel"],
"plugins": ["macros"] "plugins": ["macros"]
} }
\ No newline at end of file
{ {
"presets": [ "presets": ["next/babel"],
"next/babel" "plugins": ["transform-flow-strip-types"]
], }
"plugins": [
"transform-flow-strip-types"
]
}
\ No newline at end of file
// @flow // @flow
declare module "next" { declare module 'next' {
declare type NextApp = { declare type NextApp = {
prepare(): Promise<void>; prepare(): Promise<void>,
getRequestHandler(): any; getRequestHandler(): any,
render(req: any, res: any, pathname: string, query: any): any; render(req: any, res: any, pathname: string, query: any): any,
}; }
declare module.exports: (...opts: any) => NextApp declare module.exports: (...opts: any) => NextApp
} }
declare module "next/head" { declare module 'next/head' {
declare module.exports: Class<React$Component<any, any>>; declare module.exports: Class<React$Component<any, any>>
} }
declare module "next/link" { declare module 'next/link' {
declare module.exports: Class<React$Component<{href: string, prefetch?: bool}, any>>; declare module.exports: Class<
React$Component<{ href: string, prefetch?: boolean }, any>
>
} }
declare module "next/error" { declare module 'next/error' {
declare module.exports: Class<React$Component<{statusCode: number}, any>>; declare module.exports: Class<React$Component<{ statusCode: number }, any>>
} }
declare module "next/document" { declare module 'next/document' {
declare export var Head: Class<React$Component<any, any>>; declare export var Head: Class<React$Component<any, any>>
declare export var Main: Class<React$Component<any, any>>; declare export var Main: Class<React$Component<any, any>>
declare export var NextScript: Class<React$Component<any, any>>; declare export var NextScript: Class<React$Component<any, any>>
declare export default Class<React$Component<any, any>> & { declare export default Class<React$Component<any, any>> & {
getInitialProps: (ctx: {pathname: string, query: any, req?: any, res?: any, err?: any}) => Promise<any>; getInitialProps: (ctx: {
renderPage(cb: Function): void; pathname: string,
}; query: any,
req?: any,
res?: any,
err?: any,
}) => Promise<any>,
renderPage(cb: Function): void,
}
} }
{ {
"presets": ["next/babel"], "presets": ["next/babel"],
"plugins": [ "plugins": [["transform-react-jsx", { "pragma": "Glamor.createElement" }]]
[
"transform-react-jsx",
{ "pragma": "Glamor.createElement" }
]
]
} }
{ {
"presets": [ "presets": ["next/babel", "linaria/babel"]
"next/babel",
"linaria/babel"
]
} }
{ {
"presets": [ "presets": ["next/babel"],
"next/babel" "plugins": ["macros"]
], }
"plugins": [
"macros"
]
}
\ No newline at end of file
{ {
"presets": [ "presets": ["next/babel"]
"next/babel"
]
} }
{ {
"presets": [ "presets": ["next/babel"],
"next/babel" "plugins": [["@babel/plugin-proposal-decorators", { "legacy": true }]]
],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }]
]
} }
{ {
"presets": [ "presets": ["next/babel"],
"next/babel"
],
"plugins": [ "plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }], ["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }] ["@babel/plugin-proposal-class-properties", { "loose": true }]
......
...@@ -10,4 +10,4 @@ ...@@ -10,4 +10,4 @@
"presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]] "presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]]
} }
} }
} }
\ No newline at end of file
{ {
"presets": ["next/babel"], "presets": ["next/babel"],
"plugins": [["styled-components", { "ssr": true }], "@kiwicom/babel-plugin-orbit-components"] "plugins": [
["styled-components", { "ssr": true }],
"@kiwicom/babel-plugin-orbit-components"
]
} }
{ {
"presets": ["next/babel"], "presets": ["next/babel"],
"plugins": [ "plugins": [
["babel-plugin-react-intl", { [
"ast": true, "babel-plugin-react-intl",
"idInterpolationPattern": "[sha512:contenthash:base64:6]", {
"extractFromFormatMessageCall": true "ast": true,
}] "idInterpolationPattern": "[sha512:contenthash:base64:6]",
"extractFromFormatMessageCall": true
}
] ]
} ]
\ No newline at end of file }
{ {
"presets": ["next/babel"] "presets": ["next/babel"]
} }
\ No newline at end of file
{ {
"presets": [ "presets": ["next/babel"],
"next/babel" "plugins": [["relay", { "artifactDirectory": "__generated__" }]]
],
"plugins": [
["relay", { artifactDirectory: "__generated__" }]
]
} }
{ {
"presets": [ "presets": ["next/babel"],
"next/babel" "plugins": ["relay"]
], }
"plugins": [
"relay"
]
}
\ No newline at end of file
{ {
"presets": [ "presets": ["next/babel"]
"next/babel"
],
} }
{ {
"presets": [ "presets": ["next/babel"]
"next/babel"
]
} }
{ {
"presets": [ "presets": ["next/babel"],
"next/babel"
],
"plugins": [ "plugins": [
["styled-components", { "ssr": true, "displayName": true, "preprocess": false } ] [
"styled-components",
{ "ssr": true, "displayName": true, "preprocess": false }
]
] ]
} }
\ No newline at end of file
{ {
"presets": [ "presets": ["next/babel"],
"next/babel" "plugins": ["relay"]
], }
"plugins": [
"relay"
]
}
\ No newline at end of file
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
"next/babel", "next/babel",
{ {
"styled-jsx": { "styled-jsx": {
"plugins": [ "plugins": ["styled-jsx-plugin-postcss"]
"styled-jsx-plugin-postcss"
]
} }
} }
] ]
......
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
"next/babel", "next/babel",
{ {
"styled-jsx": { "styled-jsx": {
"plugins": [ "plugins": ["styled-jsx-plugin-sass"]
"styled-jsx-plugin-sass"
]
} }
} }
] ]
......
{ {
"presets": [ "presets": ["next/babel"],
"next/babel" "plugins": ["macros", "@emotion/babel-plugin"]
], }
"plugins": [
"macros",
"@emotion/babel-plugin"
]
}
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"type-check": "tsc --pretty --noEmit", "type-check": "tsc --pretty --noEmit",
"format": "prettier --write \"**/*.{js,ts,tsx}\"", "format": "prettier --write .",
"lint": "eslint . --ext ts --ext tsx --ext js", "lint": "eslint . --ext ts --ext tsx --ext js",
"test": "jest", "test": "jest",
"test-all": "yarn lint && yarn type-check && yarn test" "test-all": "yarn lint && yarn type-check && yarn test"
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
"lint-eslint": "eslint . --ext js,jsx,ts,tsx --max-warnings=0", "lint-eslint": "eslint . --ext js,jsx,ts,tsx --max-warnings=0",
"lint": "run-p lint-typescript prettier-check lint-eslint", "lint": "run-p lint-typescript prettier-check lint-eslint",
"lint-fix": "yarn prettier-fix && eslint . --ext js,jsx,ts,tsx --fix --max-warnings=0", "lint-fix": "yarn prettier-fix && eslint . --ext js,jsx,ts,tsx --fix --max-warnings=0",
"prettier-check": "prettier --check \"**/*.{js,mjs,cjs,jsx,json,ts,tsx,md,mdx,css,html,yml,yaml,scss,less,graphql,graphqls,gql}\"", "prettier-check": "prettier --check .",
"prettier-fix": "prettier --write \"**/*.{js,mjs,cjs,jsx,json,ts,tsx,md,mdx,css,html,yml,yaml,scss,less,graphql,graphqls,gql}\"", "prettier-fix": "prettier --write .",
"types": "lerna run types --stream", "types": "lerna run types --stream",
"typescript": "lerna run typescript", "typescript": "lerna run typescript",
"prepublish": "lerna run prepublish", "prepublish": "lerna run prepublish",
......
{ {
"presets": [ "presets": ["next/babel"]
"next/babel"
]
} }
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
} }
] ]
] ]
} }
\ No newline at end of file
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
} }
] ]
] ]
} }
\ No newline at end of file
{ {
"presets": [ "presets": [
["next/babel", { [
"preset-env": { "next/babel",
"modules": "commonjs" {
"preset-env": {
"modules": "commonjs"
}
} }
}] ]
] ]
} }
\ No newline at end of file
{ {
"presets": [ "presets": [
["next/babel", { [
"preset-env": { "next/babel",
"modules": "commonjs" {
"preset-env": {
"modules": "commonjs"
}
} }
}] ]
] ]
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment