Skip to content

Commit

Permalink
docs: rename composer
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 12, 2024
1 parent b6e9a58 commit 3175362
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export default antfu(
)
```

We also provided a `overrides` options in each integration to make it easier:
We also provided the `overrides` options in each integration to make it easier:

```js
// eslint.config.js
Expand All @@ -356,9 +356,9 @@ export default antfu({
})
```

### Pipeline
### Config Composer

Since v2.10.0, the factory function `antfu()` returns a [pipeline object from `eslint-flat-config-utils`](https://github.com/antfu/eslint-flat-config-utils#pipe) where you can chain the methods to compose the config even more flexibly.
Since v2.10.0, the factory function `antfu()` returns a [`FlatConfigComposer` object from `eslint-flat-config-utils`](https://github.com/antfu/eslint-flat-config-utils#composer) where you can chain the methods to compose the config even more flexibly.

```js
// eslint.config.js
Expand Down
8 changes: 4 additions & 4 deletions src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,20 +254,20 @@ export function antfu(
if (Object.keys(fusedConfig).length)
configs.push([fusedConfig])

let pipeline = new FlatConfigComposer<TypedFlatConfigItem>()
let composer = new FlatConfigComposer<TypedFlatConfigItem>()

pipeline = pipeline
composer = composer
.append(
...configs,
...userConfigs as any,
)

if (autoRenamePlugins) {
pipeline = pipeline
composer = composer
.renamePlugins(defaultPluginRenaming)
}

return pipeline
return composer
}

export type ResolvedOptions<T> = T extends boolean
Expand Down

0 comments on commit 3175362

Please sign in to comment.