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

docs: migration guide entry for no-inner-declarations #17977

Merged
merged 5 commits into from Jan 11, 2024

Conversation

Tanujkanti4441
Copy link
Contributor

Prerequisites checklist

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

[x] Documentation update
[ ] 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:

What changes did you make? (Give an overview)

added entry in v9 migration guide for the changes in no-inner-declarations rule.

Is there anything you'd like reviewers to focus on?

Comment of issue 17855

@Tanujkanti4441 Tanujkanti4441 requested a review from a team as a code owner January 10, 2024 04:41
@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label Jan 10, 2024
Copy link

netlify bot commented Jan 10, 2024

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit aa75669
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/659f9da6f29dc200088eb26d
😎 Deploy Preview https://deploy-preview-17977--docs-eslint.netlify.app/use/migrate-to-9.0.0
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -308,6 +309,21 @@ export default [

**Related issue(s):** [#17488](https://github.com/eslint/eslint/issues/17488)

## <a name="no-inner-declarations"></a> `no-inner-declarations` has a new default behavior with a new option

ESLint v9.0.0 introduces a new option in `no-inner-declarations` rule called `blockScopeFunctions` which by default allow block-level `functions` in strict mode when `languageOptions.ecmaVersion` is set to `2015` or above.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ESLint v9.0.0 introduces a new option in `no-inner-declarations` rule called `blockScopeFunctions` which by default allow block-level `functions` in strict mode when `languageOptions.ecmaVersion` is set to `2015` or above.
ESLint v9.0.0 introduces a new option in `no-inner-declarations` rule called `blockScopeFunctions` which by default allows block-level `functions` in strict mode when `languageOptions.ecmaVersion` is set to `2015` or above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

function foo () { } // no error
}
```

Copy link
Member

Choose a reason for hiding this comment

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

Can you add a "to address" paragraph like the other things in the migration guide? It should explain how to retain the old behavior of the rule.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@nzakas nzakas merged commit 96307da into eslint:main Jan 11, 2024
17 checks passed
@Tanujkanti4441 Tanujkanti4441 deleted the migration-update branch January 11, 2024 18:35
bmish added a commit to bmish/eslint that referenced this pull request Jan 16, 2024
* main:
  chore: Split Docs CI from core CI (eslint#17897)
  fix: Ensure config keys are printed for config errors (eslint#17980)
  chore: delete relative-module-resolver.js (eslint#17981)
  docs: migration guide entry for `no-inner-declarations` (eslint#17977)
  docs: Update README
  feat: maintain latest ecma version in ESLint (eslint#17958)
  feat!: no-inner-declaration new default behaviour and option (eslint#17885)
  feat: add `no-useless-assignment` rule (eslint#17625)
  fix: `no-misleading-character-class` edge cases with granular errors (eslint#17970)
  feat: `no-misleading-character-class` granular errors (eslint#17515)
  docs: fix number of code-path events on custom rules page (eslint#17969)
  docs: reorder entries in v9 migration guide (eslint#17967)
  fix!: handle `--output-file` for empty output when saving to disk (eslint#17957)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Relates to ESLint's documentation
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

None yet

3 participants