Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

chore: Correct examples for no-param-reassign #719

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/rules/no-param-reassign.md
Expand Up @@ -137,15 +137,15 @@ Examples of **correct** code for the `{ "props": true }` option with `"ignorePro
```js
/*eslint no-param-reassign: ["error", { "props": true, "ignorePropertyModificationsForRegex": ["^bar"] }]*/

function foo(bar) {
function foo(barVar) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this. Do you mind making this PR over in the https://github.com/eslint/eslint repo? We copy all the documentation from there, so this will get overwritten during our next release.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Is it this file? According to that file, this docs issue was already fixed back in December. Has it just not gone through a release yet?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If everything gets copied from the https://github.com/eslint/eslint repo, it would be nice to the "Edit this page" links at the bottom of the page point to the other repo instead of this one. I'm trying to wrap my head around the process here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wdoug it looks like “Edit this page” does go to the correct file. You’ll note there’s an edit_link field at the top of this file indicating the URL to use.

I’m not sure why the change was fixed in the main repo and didn’t end up in the live site. 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like it was the very first PR to land in master when we started the v7.0.0 prereleases (you can see it here), and so this is currently published in the v7.0.0 docs. This should be fixed by our release this Friday.

I don't think this is a bug, but an unfortunate side effect of our release process taking so long this major release cycle.

barVar.prop = "value";
}

function foo(bar) {
function foo(barrito) {
delete barrito.aaa;
}

function foo(bar) {
function foo(bar_) {
bar_.aaa++;
}
```
Expand Down