You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
Do not format generated files, as it breaks HMR
This commit is contained in:
@ -14,6 +14,13 @@
|
||||
|
||||
import { CodegenConfig } from "@graphql-codegen/cli";
|
||||
|
||||
// Adds a comment to the top of generated files to ignore linting and formatting
|
||||
const lintIgnore = {
|
||||
add: {
|
||||
content: "/* prettier-ignore */\n/* eslint-disable */",
|
||||
},
|
||||
} as const;
|
||||
|
||||
const config: CodegenConfig = {
|
||||
schema: "./schema.graphql",
|
||||
documents: ["src/**/*.{tsx,ts}", "!src/gql/**/*"],
|
||||
@ -29,14 +36,12 @@ const config: CodegenConfig = {
|
||||
Url: "string",
|
||||
},
|
||||
},
|
||||
plugins: [lintIgnore],
|
||||
},
|
||||
"./src/gql/schema.ts": {
|
||||
plugins: ["urql-introspection"],
|
||||
plugins: ["urql-introspection", lintIgnore],
|
||||
},
|
||||
},
|
||||
hooks: {
|
||||
afterOneFileWrite: ["prettier --write"],
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
Reference in New Issue
Block a user