extends: [
'plugin:qunit/recommended',
],
// ...
rules: {
'qunit/no-assert-ok': 2,
},
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);
}
rule enabled in
.eslintrc.js:but the Rule ignores if
assert.okis used in shared function:For example:
https://github.com/Mifrill/demo-eslint-plugin-qunit-no-assert-ok-ignore-nested-function/blob/4053e43237290754a88939e49e27732feeba24d3/tests/acceptance/index-test.js#L1-L22
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:jsfailed:Mifrill/demo-eslint-plugin-qunit-no-assert-ok-ignore-nested-function#1