package.json: add precommit script

code-style: add files to prettierignore
This commit is contained in:
Chika 2022-05-08 21:01:02 +03:00
parent c476f42e45
commit 38c2356aca
4 changed files with 8 additions and 5 deletions

View File

@ -1 +1,3 @@
.next
.next
public
services/crm/graphql/schema.graphql

View File

@ -9,6 +9,7 @@
"lint": "next lint",
"lint:fix": "next lint -- --fix",
"prettier": "prettier --write .",
"precommit": "yarn prettier && yarn lint:fix",
"graphql:codegen": "apollo client:codegen --target typescript",
"graphql:schema": "apollo client:download-schema services/crm/graphql/schema.graphql"
},

View File

@ -8,8 +8,8 @@ export default class MyDocument extends Document {
try {
ctx.renderPage = () => originalRenderPage({
enhanceApp: (App) => (props) => sheet.collectStyles(<App {...props} />),
});
enhanceApp: (App) => (props) => sheet.collectStyles(<App {...props} />),
});
const initialProps = await Document.getInitialProps(ctx);
return {

View File

@ -13,8 +13,8 @@ export const getServerSideProps: GetServerSideProps<PageProps> = async (ctx) =>
const user = await fetchUser({
headers: ctx?.req?.headers?.cookie
? {
cookie: ctx.req.headers.cookie,
}
cookie: ctx.req.headers.cookie,
}
: undefined,
});