Skip to content

Commit c120a60

Browse files
authored
fix: update eslint-config-standard-jsx (#1775)
1 parent 40f573d commit c120a60

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dependencies": {
1818
"eslint": "^8.8.0",
1919
"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",
2121
"eslint-plugin-import": "^2.25.4",
2222
"eslint-plugin-n": "^14.0.0",
2323
"eslint-plugin-promise": "^6.0.0",

test/validate-config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
})

0 commit comments

Comments
 (0)