Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update eslint-config-standard-jsx #1775

Merged
merged 2 commits into from Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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)
})