objects: optionValue,
imports: optionValue,
exports: optionValue,
- functions: (!ecmaVersion || ecmaVersion < 8) ? "ignore" : optionValue
+ functions: ecmaVersion < 2017 ? "ignore" : optionValue
};
}
if (typeof optionValue === "object" && optionValue !== null) {
docs: {
description: "Require or disallow trailing commas",
recommended: false,
- url: "https://eslint.org/docs/rules/comma-dangle"
+ url: "https://eslint.org/docs/latest/rules/comma-dangle"
},
fixable: "code",
},
create(context) {
- const options = normalizeOptions(context.options[0], context.parserOptions.ecmaVersion);
+ const options = normalizeOptions(context.options[0], context.languageOptions.ecmaVersion);
- const sourceCode = context.getSourceCode();
+ const sourceCode = context.sourceCode;
/**
* Gets the last item of the given node.
"always-multiline": forceTrailingCommaIfMultiline,
"only-multiline": allowTrailingCommaIfMultiline,
never: forbidTrailingComma,
- ignore: () => {}
+ ignore() {}
};
return {