mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge branch 'master' into collections
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
import {NON_METEOR} from '../util/environment'
|
||||
import {getExecutors} from '../util'
|
||||
import {isMeteorCall, getPropertyName, refersTo, hasContext} from '../util/ast'
|
||||
import {isMeteorCall, isMeteorProp, getPropertyName, refersTo, hasContext} from '../util/ast'
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Rule Definition
|
||||
@@ -117,6 +117,11 @@ module.exports = getMeta => context => {
|
||||
return {
|
||||
|
||||
NewExpression: function (node) {
|
||||
|
||||
if (!isMeteorProp(node.callee, 'Error')) {
|
||||
return
|
||||
}
|
||||
|
||||
const executors = getExecutors(env, context.getAncestors())
|
||||
if (executors.size === 0) {
|
||||
return
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
"colors": "1.1.2",
|
||||
"coveralls": "2.11.4",
|
||||
"cz-conventional-changelog": "1.1.4",
|
||||
"eslint": "1.7.2",
|
||||
"eslint": "1.7.3",
|
||||
"ghooks": "0.3.2",
|
||||
"istanbul": "0.4.0",
|
||||
"mocha": "2.3.3",
|
||||
|
||||
@@ -14,6 +14,7 @@ const rule = require('../../../dist/rules/methods')
|
||||
const RuleTester = require('eslint').RuleTester
|
||||
|
||||
const commonValidCode = [
|
||||
'new Meteor.foo()',
|
||||
'Meteor.call("foo")',
|
||||
'Meteor.call("foo", true)',
|
||||
'Meteor.apply("foo", [], function () {})',
|
||||
|
||||
Reference in New Issue
Block a user