Part of #407.
@ -8,7 +8,7 @@ function processOptions(options, defaults) {
});
Object.keys(defaults).forEach(name => {
if (!processedOptions.hasOwnProperty(name)) {
if (!Object.prototype.hasOwnProperty.call(processedOptions, name)) {
processedOptions[name] = defaults[name];
}
@ -33,7 +33,7 @@ function reportDuplicateLabels(ast) {
action: checkExpressionWithClonedEnv,
labeled(node, env) {
if (env.hasOwnProperty(node.label)) {
if (Object.prototype.hasOwnProperty.call(env, node.label)) {
throw new GrammarError(
"Label \"" + node.label + "\" is already defined "
+ "at line " + env[node.label].start.line + ", "
@ -9,7 +9,7 @@ function reportDuplicateRules(ast) {
let check = visitor.build({
rule(node) {
if (rules.hasOwnProperty(node.name)) {
if (Object.prototype.hasOwnProperty.call(rules, node.name)) {
"Rule \"" + node.name + "\" is already defined "
+ "at line " + rules[node.name].start.line + ", "
@ -61,7 +61,7 @@ let visitor = {
};
Object.keys(DEFAULT_FUNCTIONS).forEach(type => {
if (!functions.hasOwnProperty(type)) {
if (!Object.prototype.hasOwnProperty.call(functions, type)) {
functions[type] = DEFAULT_FUNCTIONS[type];