From f9fc695d77c19cd5ecb3f0e97e1ea124c8543409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=9A=E8=B0=94=E7=9A=84=E7=8C=AB?= Date: Sat, 14 Sep 2019 18:52:52 +0800 Subject: [PATCH] Chore: enable default-param-last (#12244) note: this is a breaking change in eslint-config-eslint. refs:https://github.com/eslint/eslint/commit/0313441d016c8aa0674c135f9da67a676e766ec5 --- lib/rules/capitalized-comments.js | 4 ++-- packages/eslint-config-eslint/default.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rules/capitalized-comments.js b/lib/rules/capitalized-comments.js index 47477743598..dd7ef145648 100644 --- a/lib/rules/capitalized-comments.js +++ b/lib/rules/capitalized-comments.js @@ -59,7 +59,7 @@ const DEFAULTS = { * @param {string} which Either "line" or "block". * @returns {Object} The normalized options. */ -function getNormalizedOptions(rawOptions = {}, which) { +function getNormalizedOptions(rawOptions, which) { return Object.assign({}, DEFAULTS, rawOptions[which] || rawOptions); } @@ -70,7 +70,7 @@ function getNormalizedOptions(rawOptions = {}, which) { * @returns {Object} An object with "Line" and "Block" keys and corresponding * normalized options objects. */ -function getAllNormalizedOptions(rawOptions) { +function getAllNormalizedOptions(rawOptions = {}) { return { Line: getNormalizedOptions(rawOptions, "line"), Block: getNormalizedOptions(rawOptions, "block") diff --git a/packages/eslint-config-eslint/default.yml b/packages/eslint-config-eslint/default.yml index 8e8c8c57ad6..526ce5600ef 100644 --- a/packages/eslint-config-eslint/default.yml +++ b/packages/eslint-config-eslint/default.yml @@ -20,6 +20,7 @@ rules: consistent-return: "error" curly: ["error", "all"] default-case: "error" + default-param-last: "error" dot-location: ["error", "property"] dot-notation: ["error", { allowKeywords: true }] eol-last: "error"