@@ -15,8 +15,8 @@ test.afterEach.always(async t => {
15
15
await fs . rm ( t . context . cwd , { recursive : true , force : true } ) ;
16
16
} ) ;
17
17
18
- test ( 'base config rules' , async t => {
19
- const flatConfig = await xoToEslintConfig ( undefined ) ;
18
+ test ( 'base config rules' , t => {
19
+ const flatConfig = xoToEslintConfig ( undefined ) ;
20
20
21
21
t . deepEqual ( getJsRule ( flatConfig , '@stylistic/indent' ) , [
22
22
'error' ,
@@ -28,8 +28,8 @@ test('base config rules', async t => {
28
28
t . deepEqual ( getJsRule ( flatConfig , '@stylistic/quotes' ) , [ 'error' , 'single' ] ) ;
29
29
} ) ;
30
30
31
- test ( 'empty config rules' , async t => {
32
- const flatConfig = await xoToEslintConfig ( [ ] ) ;
31
+ test ( 'empty config rules' , t => {
32
+ const flatConfig = xoToEslintConfig ( [ ] ) ;
33
33
34
34
t . deepEqual ( getJsRule ( flatConfig , '@stylistic/indent' ) , [
35
35
'error' ,
@@ -41,8 +41,8 @@ test('empty config rules', async t => {
41
41
t . deepEqual ( getJsRule ( flatConfig , '@stylistic/quotes' ) , [ 'error' , 'single' ] ) ;
42
42
} ) ;
43
43
44
- test ( 'config with space option' , async t => {
45
- const flatConfig = await xoToEslintConfig ( [ { space : true } ] ) ;
44
+ test ( 'config with space option' , t => {
45
+ const flatConfig = xoToEslintConfig ( [ { space : true } ] ) ;
46
46
47
47
t . deepEqual ( getJsRule ( flatConfig , '@stylistic/indent' ) , [
48
48
'error' ,
@@ -52,20 +52,20 @@ test('config with space option', async t => {
52
52
] ) ;
53
53
} ) ;
54
54
55
- test ( 'config with semi false option' , async t => {
56
- const flatConfig = await xoToEslintConfig ( [ { semicolon : false } ] ) ;
55
+ test ( 'config with semi false option' , t => {
56
+ const flatConfig = xoToEslintConfig ( [ { semicolon : false } ] ) ;
57
57
58
58
t . deepEqual ( getJsRule ( flatConfig , '@stylistic/semi' ) , [ 'error' , 'never' ] ) ;
59
59
} ) ;
60
60
61
- test ( 'config with rules' , async t => {
62
- const flatConfig = await xoToEslintConfig ( [ { rules : { 'no-console' : 'error' } } ] ) ;
61
+ test ( 'config with rules' , t => {
62
+ const flatConfig = xoToEslintConfig ( [ { rules : { 'no-console' : 'error' } } ] ) ;
63
63
64
64
t . is ( getJsRule ( flatConfig , 'no-console' ) , 'error' ) ;
65
65
} ) ;
66
66
67
- test ( 'with prettier option' , async t => {
68
- const flatConfig = await xoToEslintConfig ( [ { prettier : true } ] ) ;
67
+ test ( 'with prettier option' , t => {
68
+ const flatConfig = xoToEslintConfig ( [ { prettier : true } ] ) ;
69
69
70
70
const prettierConfigTs = flatConfig . find ( config =>
71
71
typeof config ?. plugins ?. [ 'prettier' ] === 'object'
@@ -106,8 +106,8 @@ test('with prettier option', async t => {
106
106
] ) ;
107
107
} ) ;
108
108
109
- test ( 'with prettier option compat' , async t => {
110
- const flatConfig = await xoToEslintConfig ( [ { prettier : 'compat' } ] ) ;
109
+ test ( 'with prettier option compat' , t => {
110
+ const flatConfig = xoToEslintConfig ( [ { prettier : 'compat' } ] ) ;
111
111
112
112
const prettierConfigTs = flatConfig . find ( config =>
113
113
typeof config ?. plugins ?. [ 'prettier' ] === 'object'
@@ -126,8 +126,8 @@ test('with prettier option compat', async t => {
126
126
t . is ( getJsRule ( flatConfig , '@stylistic/semi' ) , 'off' ) ;
127
127
} ) ;
128
128
129
- test ( 'with prettier option and space' , async t => {
130
- const flatConfig = await xoToEslintConfig ( [ { prettier : true , space : true } ] ) ;
129
+ test ( 'with prettier option and space' , t => {
130
+ const flatConfig = xoToEslintConfig ( [ { prettier : true , space : true } ] ) ;
131
131
132
132
const prettierConfigTs = flatConfig . find ( config =>
133
133
typeof config ?. plugins ?. [ 'prettier' ] === 'object'
@@ -168,8 +168,8 @@ test('with prettier option and space', async t => {
168
168
] ) ;
169
169
} ) ;
170
170
171
- test ( 'with react option' , async t => {
172
- const flatConfig = await xoToEslintConfig ( [ { react : true } ] ) ;
171
+ test ( 'with react option' , t => {
172
+ const flatConfig = xoToEslintConfig ( [ { react : true } ] ) ;
173
173
174
174
const reactPlugin = flatConfig . find ( config =>
175
175
typeof config ?. plugins ?. [ 'react' ] === 'object' ) ;
@@ -182,20 +182,20 @@ test('with react option', async t => {
182
182
t . is ( getJsRule ( flatConfig , 'react/no-danger' ) , 'error' ) ;
183
183
} ) ;
184
184
185
- test ( 'supports files config option as a string' , async t => {
186
- const flatConfig = await xoToEslintConfig ( [ { files : 'src/**/*.ts' } ] ) ;
185
+ test ( 'supports files config option as a string' , t => {
186
+ const flatConfig = xoToEslintConfig ( [ { files : 'src/**/*.ts' } ] ) ;
187
187
188
188
t . deepEqual ( flatConfig . at ( - 1 ) ?. files , [ 'src/**/*.ts' ] ) ;
189
189
} ) ;
190
190
191
- test ( 'no files config option defaults to allFilesGlob' , async t => {
192
- const flatConfig = await xoToEslintConfig ( [ { files : undefined } ] ) ;
191
+ test ( 'no files config option defaults to allFilesGlob' , t => {
192
+ const flatConfig = xoToEslintConfig ( [ { files : undefined } ] ) ;
193
193
194
194
t . deepEqual ( flatConfig . at ( - 1 ) ?. files , [ allFilesGlob ] ) ;
195
195
} ) ;
196
196
197
- test ( 'prettier rules are applied after react rules' , async t => {
198
- const flatConfig = await xoToEslintConfig ( [ { prettier : 'compat' , react : true } ] ) ;
197
+ test ( 'prettier rules are applied after react rules' , t => {
198
+ const flatConfig = xoToEslintConfig ( [ { prettier : 'compat' , react : true } ] ) ;
199
199
200
200
t . is ( getJsRule ( flatConfig , 'react/jsx-tag-spacing' ) , 'off' ) ;
201
201
} ) ;
0 commit comments