We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 077c3d9 commit b5768d6Copy full SHA for b5768d6
tests/lib/rules/no-try-invoke.js
@@ -4,17 +4,13 @@ const RuleTester = require('eslint').RuleTester;
4
const { ERROR_MESSAGE } = rule;
5
const ruleTester = new RuleTester({
6
parserOptions: {
7
- ecmaVersion: 2020,
+ ecmaVersion: 2018,
8
sourceType: 'module',
9
},
10
});
11
12
ruleTester.run('no-try-invoke', rule, {
13
valid: [
14
- // with optional chaining
15
- 'this.foo?.()',
16
-
17
- // with tryInvoke
18
"tryInvoke(this, 'foo');",
19
"import { tryInvoke } from '@ember/utils'; foo.tryInvoke(this, 'foo');",
20
"import { tryInvoke } from '@ember/utils'; tryInvoke.foo(this, 'foo');",
0 commit comments