Skip to content

Commit 716fed5

Browse files
committed
feat: enable antfu/no-top-level-await
1 parent fd833bb commit 716fed5

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/configs/disables.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@ import type { TypedFlatConfigItem } from '../types'
44
export function disables(): TypedFlatConfigItem[] {
55
return [
66
{
7-
files: [`scripts/${GLOB_SRC}`],
7+
files: [`**/scripts/${GLOB_SRC}`],
88
name: 'coderwyd/disables/scripts',
99
rules: {
10+
'antfu/no-top-level-await': 'off',
1011
'no-console': 'off',
1112
'ts/explicit-function-return-type': 'off',
1213
},
1314
},
1415
{
15-
files: [`cli/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
16+
files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
1617
name: 'coderwyd/disables/cli',
1718
rules: {
19+
'antfu/no-top-level-await': 'off',
1820
'no-console': 'off',
1921
},
2022
},
@@ -40,6 +42,7 @@ export function disables(): TypedFlatConfigItem[] {
4042
files: ['**/*.{test,spec}.([tj])s?(x)'],
4143
name: 'coderwyd/disables/test',
4244
rules: {
45+
'antfu/no-top-level-await': 'off',
4346
'no-unused-expressions': 'off',
4447
},
4548
},

src/configs/javascript.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ export function javascript(
4848
{ enforceForClassMembers: true, setWithoutGet: true },
4949
],
5050

51+
'antfu/no-top-level-await': 'error',
52+
5153
'array-callback-return': 'error',
5254
'block-scoped-var': 'error',
5355
'constructor-super': 'error',

src/configs/vue.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,11 @@ export async function vue(
106106
rules: {
107107
...pluginVue.configs.base.rules,
108108
...vueRules,
109-
109+
'antfu/no-top-level-await': 'off',
110110
'node/prefer-global/process': 'off',
111111

112+
'ts/explicit-function-return-type': 'off',
113+
112114
'vue/block-order': [
113115
'error',
114116
{

0 commit comments

Comments
 (0)