Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove useless additionalItems: false from padding-line-between-statements schema #15706

Merged

Conversation

MartinSadovy
Copy link
Contributor

@MartinSadovy MartinSadovy commented Mar 16, 2022

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[X] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

Tell us about your environment:

  • ESLint Version: 8.11.0
  • Node Version: 16.13.2
  • ajv version: 8.10.0

What changes did you make? (Give an overview)

If you run AJV in strict mode, you will get error:

Error: strict mode: "additionalItems" is ignored when "items" is not an array of schemas

see https://github.com/ajv-validator/ajv/blob/master/docs/json-schema.md

Note: Many another rule schemas are not 100% valid in strict mode. This is just one of them.

@eslint-github-bot eslint-github-bot bot added triage An ESLint team member will look at this issue soon bug ESLint is working incorrectly labels Mar 16, 2022
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 16, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • login: MartinSadovy / name: Martin Sadovy (c8cc945)

@mdjermanovic mdjermanovic added rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion chore This change is not user-facing and removed bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon labels Mar 16, 2022
@mdjermanovic mdjermanovic changed the title fix: Error: strict mode: "additionalItems" is ignored when "items" is not an array of schemas chore: Error: strict mode: "additionalItems" is ignored when "items" is not an array of schemas Mar 16, 2022
@eslint-github-bot eslint-github-bot bot added the bug ESLint is working incorrectly label Mar 16, 2022
Copy link
Member

@mdjermanovic mdjermanovic left a comment

LGTM, thanks!

This is a non-breaking change because those two additionalItems: false were just ignored. Validation works the same with and without them. For clarity, ESLint uses Ajv 6 without strict checks, so this error doesn't appear anywhere. Still, additionalItems: false is indeed useless when the array is not a tuple, so it's better to remove it to avoid confusion about the intent.

@mdjermanovic mdjermanovic merged commit 18f5e05 into eslint:main Mar 16, 2022
14 checks passed
@mdjermanovic mdjermanovic changed the title chore: Error: strict mode: "additionalItems" is ignored when "items" is not an array of schemas chore: remove useless additionalItems: false from padding-line-between-statements schema Mar 16, 2022
@mdjermanovic mdjermanovic removed the bug ESLint is working incorrectly label Mar 16, 2022
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Mar 27, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | devDependencies | minor | [`8.11.0` -> `8.12.0`](https://renovatebot.com/diffs/npm/eslint/8.11.0/8.12.0) |

---

### Release Notes

<details>
<summary>eslint/eslint</summary>

### [`v8.12.0`](https://github.com/eslint/eslint/releases/v8.12.0)

[Compare Source](eslint/eslint@v8.11.0...v8.12.0)

#### Features

-   [`685a67a`](eslint/eslint@685a67a) feat: fix logic for top-level `this` in no-invalid-this and no-eval ([#&#8203;15712](eslint/eslint#15712)) (Milos Djermanovic)

#### Chores

-   [`18f5e05`](eslint/eslint@18f5e05) chore: padding-line-between-statements remove useless `additionalItems` ([#&#8203;15706](eslint/eslint#15706)) (Martin Sadovy)

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

 **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1256
Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
srijan-deepsource pushed a commit to deepsourcelabs/eslint that referenced this pull request May 30, 2022
srijan-deepsource added a commit to deepsourcelabs/eslint that referenced this pull request May 30, 2022
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Sep 13, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Sep 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion chore This change is not user-facing rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants