https://github.com/graylog2/oxfmt-config
Shared configuration for the `oxfmt` formatter
https://github.com/graylog2/oxfmt-config
Last synced: 7 days ago
JSON representation
Shared configuration for the `oxfmt` formatter
- Host: GitHub
- URL: https://github.com/graylog2/oxfmt-config
- Owner: Graylog2
- License: mit
- Created: 2026-05-05T07:05:02.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-05-05T08:14:48.000Z (3 months ago)
- Last Synced: 2026-06-12T19:41:58.444Z (about 2 months ago)
- Language: TypeScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Graylog's Oxfmt Config
This package is a shared [oxfmt](https://oxc.rs/docs/guide/usage/formatter) config for Graylog projects. Its rules mirror [`@graylog/prettier-config`](https://github.com/Graylog2/prettier-config).
Unlike Prettier, oxfmt does not support extending configurations from a package directly. Instead, create an `oxfmt.config.ts` in your project root that imports and re-exports this config — oxfmt picks it up automatically:
```ts
import { defineConfig } from 'oxfmt';
import config from '@graylog/oxfmt-config' with { type: 'json' };
export default defineConfig(config);
```
`defineConfig` from `oxfmt` provides type inference for the config object. You can spread the shared config and override fields locally if needed:
```ts
import { defineConfig } from 'oxfmt';
import config from '@graylog/oxfmt-config' with { type: 'json' };
export default defineConfig({ ...config, printWidth: 100 });
```
See the [oxfmt configuration reference](https://oxc.rs/docs/guide/usage/formatter#configuration) for the full list of supported options.