Skip to content

Commit

Permalink
fix: update eslint-config-standard-jsx (#1775)
Browse files Browse the repository at this point in the history
  • Loading branch information
voxpelli committed Feb 3, 2022
1 parent 40f573d commit c120a60
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"eslint": "^8.8.0",
"eslint-config-standard": "17.0.0-1",
"eslint-config-standard-jsx": "11.0.0-0",
"eslint-config-standard-jsx": "11.0.0-1",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-n": "^14.0.0",
"eslint-plugin-promise": "^6.0.0",
Expand Down
16 changes: 16 additions & 0 deletions test/validate-config.js
@@ -0,0 +1,16 @@
import test from 'tape'
import standard from '../index.js'

test('load config in eslint to validate all rule syntax is correct', async function (t) {
t.plan(1)
const code = 'const foo = 1\nconst bar = function () {}\nbar(foo)\n'
const [result] = await standard.lintText(code)
t.equal(result.errorCount, 0)
})

test('ensure we allow top level await', async function (t) {
t.plan(1)
const code = 'const foo = await 1\nconst bar = function () {}\nawait bar(foo)\n'
const [result] = await standard.lintText(code)
t.equal(result.errorCount, 0)
})

0 comments on commit c120a60

Please sign in to comment.