diff --git a/lib/rules/prefer-session-equals.js b/lib/rules/prefer-session-equals.js index ad07da9..997c507 100644 --- a/lib/rules/prefer-session-equals.js +++ b/lib/rules/prefer-session-equals.js @@ -10,7 +10,6 @@ const isSessionGetCallExpression = node => ( node.type === 'CallExpression' && node.callee.type === 'MemberExpression' && ( - node.callee.type === 'MemberExpression' && node.callee.object.type === 'Identifier' && node.callee.object.name === 'Session' && ( ( diff --git a/tests/lib/rules/prefer-session-equals.js b/tests/lib/rules/prefer-session-equals.js index 9ee722d..5395f4f 100644 --- a/tests/lib/rules/prefer-session-equals.js +++ b/tests/lib/rules/prefer-session-equals.js @@ -15,6 +15,10 @@ const ruleTester = new RuleTester() ruleTester.run('prefer-session-equals', rule, { valid: [ + 'var x = 1', + 'if(x()) {}', + 'if (true) {}', + 'if (Session["equals"]("foo", true)) {}', 'if (Session.equals("foo", true)) {}', 'if (Session.equals("foo", false)) {}', 'if (Session.equals("foo", 1)) {}', diff --git a/tests/lib/rules/template-naming-convention.js b/tests/lib/rules/template-naming-convention.js index 9c37e0a..f3562ec 100644 --- a/tests/lib/rules/template-naming-convention.js +++ b/tests/lib/rules/template-naming-convention.js @@ -93,6 +93,13 @@ ruleTester.run('template-naming-convention', rule, { { message: 'Invalid template naming convention, expected "camel-case"', type: 'MemberExpression' }, ], }, + { + code: 'Template.foo_bar.helpers({})', + options: ['pascal-case'], + errors: [ + { message: 'Invalid template naming convention, expected "pascal-case"', type: 'MemberExpression' }, + ], + }, { code: 'Template.fooBar.helpers({})', options: ['snake-case'],