···1010- [Installation](#installation)
1111- [Configuration](#configuration)
1212 - [Formatting](#formatting)
1313+ - [Linting](#linting)
1314 - [Enums](#enums)
1415 - [Config API](#config-api)
1516- [Contributing](#contributing)
···97989899### Formatting
99100100100-By default, `openapi-ts` will automatically format your client according to your project configuration. To disable automatic formatting, set `autoformat` to false
101101+By default, `openapi-ts` will automatically format your client according to your project configuration. To disable automatic formatting, set `format` to false
102102+103103+```ts
104104+import { defineConfig } from '@nicolas-chaulet/openapi-typescript-codegen';
105105+106106+export default defineConfig({
107107+ format: false,
108108+ input: 'path/to/openapi.json',
109109+ output: 'src/client',
110110+})
111111+```
112112+113113+You can also prevent your client from being processed by formatters by adding your output path to the tool's ignore file (e.g. `.prettierignore`).
114114+115115+### Linting
116116+117117+For performance reasons, `openapi-ts` does not automatically lint your client. To enable this feature, set `lint` to true
101118102119```ts
103120import { defineConfig } from '@nicolas-chaulet/openapi-typescript-codegen';
104121105122export default defineConfig({
106106- autoformat: false,
107123 input: 'path/to/openapi.json',
124124+ lint: true,
108125 output: 'src/client',
109126})
110127```
111128112112-You can also prevent your client from being processed by formatters and linters by adding your output path to the tool's ignore file (e.g. `.eslintignore`, `.prettierignore`).
129129+You can also prevent your client from being processed by linters by adding your output path to the tool's ignore file (e.g. `.eslintignore`).
113130114131### Enums
115132···148165 -c, --client <value> HTTP client to generate [fetch, xhr, node, axios, angular] (default: "fetch")
149166 --name <value> Custom client class name
150167 --useOptions <value> Use options instead of arguments (default: false)
151151- --no-autoformat Disable processing generated files with formatter
152168 --base <value> Manually set base in OpenAPI config instead of inferring from server value
153169 --enums Generate JavaScript objects from enum definitions (default: false)
154170 --exportCore <value> Write core files to disk (default: true)
155171 --exportServices <value> Write services to disk [true, false, regexp] (default: true)
156172 --exportModels <value> Write models to disk [true, false, regexp] (default: true)
157173 --exportSchemas <value> Write schemas to disk (default: false)
174174+ --format Process output folder with formatter?
175175+ --no-format Disable processing output folder with formatter
176176+ --lint Process output folder with linter?
177177+ --no-lint Disable processing output folder with linter
158178 --no-operationId Use path URL to generate operation ID
159179 --postfixServices Service name postfix (default: "Service")
160180 --postfixModels Model name postfix
+5-3
bin/index.js
···1717 .option('-c, --client <value>', 'HTTP client to generate [angular, axios, fetch, node, xhr]')
1818 .option('--name <value>', 'Custom client class name')
1919 .option('--useOptions [value]', 'Use options instead of arguments')
2020- .option('--autoformat', 'Process generated files with formatter?')
2121- .option('--no-autoformat', 'Disable processing generated files with formatter')
2220 .option('--base [value]', 'Manually set base in OpenAPI config instead of inferring from server value')
2321 .option('--enums', 'Generate JavaScript objects from enum definitions')
2422 .option('--exportCore <value>', 'Write core files to disk')
2523 .option('--exportServices <value>', 'Write services to disk')
2624 .option('--exportModels <value>', 'Write models to disk')
2725 .option('--exportSchemas <value>', 'Write schemas to disk')
2626+ .option('--format', 'Process output folder with formatter?')
2727+ .option('--no-format', 'Disable processing output folder with formatter')
2828+ .option('--lint', 'Process output folder with linter?')
2929+ .option('--no-lint', 'Disable processing output folder with linter')
2830 .option('--operationId', 'Use operationd ID?')
2931 .option('--no-operationId', 'Use path URL to generate operation ID')
3032 .option('--postfixServices <value>', 'Service name postfix')
···39414042async function start() {
4143 try {
4242- const { createClient } = await import(new URL('../dist/index.js', import.meta.url));
4444+ const { createClient } = await import(new URL('../dist/node/index.js', import.meta.url));
4345 await createClient(params);
4446 process.exit(0);
4547 } catch (error) {