Skip to content

Commit

Permalink
docs: add top-level-await for better IDE support
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Nov 20, 2023
1 parent b7ea6f0 commit 478b3ab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ With [`"type": "module"`](https://nodejs.org/api/packages.html#type) in `package
// eslint.config.js
import antfu from '@antfu/eslint-config'

export default antfu()
export default await antfu()
```

With CJS:
Expand Down Expand Up @@ -155,7 +155,7 @@ Normally you only need to import the `antfu` preset:
// eslint.config.js
import antfu from '@antfu/eslint-config'

export default antfu()
export default await antfu()
```

And that's it! Or you can configure each integration individually, for example:
Expand All @@ -164,7 +164,7 @@ And that's it! Or you can configure each integration individually, for example:
// eslint.config.js
import antfu from '@antfu/eslint-config'

export default antfu({
export default await antfu({
// Enable stylistic formatting rules
// stylistic: true,

Expand Down Expand Up @@ -196,7 +196,7 @@ The `antfu` factory function also accepts any number of arbitrary custom config
// eslint.config.js
import antfu from '@antfu/eslint-config'

export default antfu(
export default await antfu(
{
// Configures for antfu's config
},
Expand Down Expand Up @@ -241,7 +241,7 @@ import {
yaml,
} from '@antfu/eslint-config'

export default combine(
export default await combine(
ignores(),
javascript(/* Options */),
comments(),
Expand Down Expand Up @@ -294,7 +294,7 @@ Certain rules would only be enabled in specific files, for example, `ts/*` rules
// eslint.config.js
import antfu from '@antfu/eslint-config'

export default antfu(
export default await antfu(
{ vue: true, typescript: true },
{
// Remember to specify the file glob here, otherwise it might cause the vue plugin to handle non-vue files
Expand Down

0 comments on commit 478b3ab

Please sign in to comment.