From c2a00364c35512b689103a50e96f5e93d234487f Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Thu, 12 Aug 2021 08:37:21 +0900 Subject: [PATCH 1/4] Disable Dependabot on default branch (#5452) Currently, we have mainly developed on the `v14` branch. See #5439. See also: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#open-pull-requests-limit --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 51c9edbfb8..c3775a7a05 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,7 +4,7 @@ updates: directory: '/' schedule: interval: weekly - open-pull-requests-limit: 5 + open-pull-requests-limit: 0 # TODO: Disable on the default branch during `v14` in progress. labels: - 'pr: dependencies' versioning-strategy: increase From 864b01beed919bfc4317ec538e816ac49042ed82 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Thu, 12 Aug 2021 18:09:38 +0900 Subject: [PATCH 2/4] Set `target-branch: v14` for Dependabot again (#5453) This change is a retry of PR #5439 and also a revert of PR #5452. Maybe, `target-branch: v14` should be set on the `master` branch, not `v14`. --- .github/dependabot.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c3775a7a05..c67d1285ae 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,7 +4,8 @@ updates: directory: '/' schedule: interval: weekly - open-pull-requests-limit: 0 # TODO: Disable on the default branch during `v14` in progress. + open-pull-requests-limit: 5 labels: - 'pr: dependencies' versioning-strategy: increase + target-branch: 'v14' # TODO: Remove when releasing v14. From 0fe484887336c8c9db877407a5fd908a7550d985 Mon Sep 17 00:00:00 2001 From: Yevgeny Petukhov Date: Thu, 2 Sep 2021 16:01:07 +0300 Subject: [PATCH 3/4] Fix max-empty-lines before comments --- lib/rules/max-empty-lines/__tests__/index.js | 7 +++++++ lib/rules/max-empty-lines/index.js | 15 +++------------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/rules/max-empty-lines/__tests__/index.js b/lib/rules/max-empty-lines/__tests__/index.js index dafd1ed002..7cbc1e50fb 100644 --- a/lib/rules/max-empty-lines/__tests__/index.js +++ b/lib/rules/max-empty-lines/__tests__/index.js @@ -117,6 +117,13 @@ testRule({ line: 5, column: 1, }, + { + code: 'a {}\n\n\n/** horse */\n\nb {}', + fixed: 'a {}\n\n/** horse */\n\nb {}', + message: messages.expected(1), + line: 3, + column: 1, + }, { code: 'a {}\r\n\r\n/** horse */\r\n\r\n\r\nb {}', fixed: 'a {}\r\n\r\n/** horse */\r\n\r\nb {}', diff --git a/lib/rules/max-empty-lines/index.js b/lib/rules/max-empty-lines/index.js index e6b6d383f1..2824715399 100644 --- a/lib/rules/max-empty-lines/index.js +++ b/lib/rules/max-empty-lines/index.js @@ -50,23 +50,14 @@ function rule(max, options, context) { if (context.fix) { root.walk((node) => { if (node.type === 'comment') { - // for inline comments - if (node.raws.inline) { - node.raws.before = getChars(node.raws.before); - } - if (!ignoreComments) { node.raws.left = getChars(node.raws.left); node.raws.right = getChars(node.raws.right); } - } else { - if (node.raws.before) { - node.raws.before = getChars(node.raws.before); - } + } - if (node.raws.after) { - node.raws.after = getChars(node.raws.after); - } + if (node.raws.before) { + node.raws.before = getChars(node.raws.before); } }); From 220a27c668b291fc8d7d7042a43324bfce4d55b1 Mon Sep 17 00:00:00 2001 From: Yevgeny Petukhov Date: Thu, 2 Sep 2021 16:09:41 +0300 Subject: [PATCH 4/4] Update snapshot --- system-tests/003/__snapshots__/no-fs.test.js.snap | 2 -- 1 file changed, 2 deletions(-) diff --git a/system-tests/003/__snapshots__/no-fs.test.js.snap b/system-tests/003/__snapshots__/no-fs.test.js.snap index 33b27ad578..9aa6062945 100644 --- a/system-tests/003/__snapshots__/no-fs.test.js.snap +++ b/system-tests/003/__snapshots__/no-fs.test.js.snap @@ -15,7 +15,6 @@ Object { /* Your images should be linked as if the CSS file sits in the same folder as the images. ie. no paths. */ - /* basic elements */ html { margin: 0; @@ -66,7 +65,6 @@ abbr { border-bottom: none; } - /* specific divs */ .page-wrapper { background: url(http://csszengarden.com/001/zen-bg.jpg) no-repeat top left;