File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 17
17
"dependencies" : {
18
18
"eslint" : " ^8.8.0" ,
19
19
"eslint-config-standard" : " 17.0.0-1" ,
20
- "eslint-config-standard-jsx" : " 11.0.0-0 " ,
20
+ "eslint-config-standard-jsx" : " 11.0.0-1 " ,
21
21
"eslint-plugin-import" : " ^2.25.4" ,
22
22
"eslint-plugin-n" : " ^14.0.0" ,
23
23
"eslint-plugin-promise" : " ^6.0.0" ,
Original file line number Diff line number Diff line change
1
+ import test from 'tape'
2
+ import standard from '../index.js'
3
+
4
+ test ( 'load config in eslint to validate all rule syntax is correct' , async function ( t ) {
5
+ t . plan ( 1 )
6
+ const code = 'const foo = 1\nconst bar = function () {}\nbar(foo)\n'
7
+ const [ result ] = await standard . lintText ( code )
8
+ t . equal ( result . errorCount , 0 )
9
+ } )
10
+
11
+ test ( 'ensure we allow top level await' , async function ( t ) {
12
+ t . plan ( 1 )
13
+ const code = 'const foo = await 1\nconst bar = function () {}\nawait bar(foo)\n'
14
+ const [ result ] = await standard . lintText ( code )
15
+ t . equal ( result . errorCount , 0 )
16
+ } )
You can’t perform that action at this time.
0 commit comments