Limitation: no-assert-ok does not working for nested function #199
Open
Description
rule enabled in .eslintrc.js
:
extends: [
'plugin:qunit/recommended',
],
// ...
rules: {
'qunit/no-assert-ok': 2,
},
but the Rule ignores if assert.ok
is used in shared function:
test('test 1', async function (assert) {
await sharedAssert(assert);
});
test('test 2', async function (assert) {
await sharedAssert(assert);
});
async function sharedAssert(assert) {
await visit('/');
assert.ok(true);
}
Lint passed:
https://github.com/Mifrill/demo-eslint-plugin-qunit-no-assert-ok-ignore-nested-function/runs/3266269169
Rule:
https://github.com/platinumazure/eslint-plugin-qunit/blob/master/docs/rules/no-assert-ok.md
Repo with bug reproduce:
https://github.com/Mifrill/demo-eslint-plugin-qunit-no-assert-ok-ignore-nested-function
Expected lint:js
failed:
Mifrill/demo-eslint-plugin-qunit-no-assert-ok-ignore-nested-function#1