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: Improve example of Lint/ToJSON #8605

Merged
merged 1 commit into from Sep 15, 2020
Merged

Conversation

jaredbeck
Copy link
Contributor

@jaredbeck jaredbeck commented Aug 27, 2020

I'm trying to understand the existing description of this cop. Does this new example improve the description?


  • Wrote good commit messages.
  • [N/A] Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • [N/A] Added tests.
  • [N/A] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • [N/A to this type of code comments?] Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

@marcandre
Copy link
Contributor

Good question. Isn't defining to_json to be avoided altogether in favor of as_json?

@bbatsov
Copy link
Collaborator

bbatsov commented Sep 11, 2020

Here's the original ticket that prompted the creation of that cop #6378 Perhaps something has changed in the meantime?

@jaredbeck
Copy link
Contributor Author

Docs regenerated

@bbatsov bbatsov merged commit 0d3f5e2 into rubocop:master Sep 15, 2020
@bbatsov
Copy link
Collaborator

bbatsov commented Sep 15, 2020

Thanks!

@jaredbeck jaredbeck deleted the patch-3 branch September 15, 2020 06:48
@akostadinov
Copy link

Good question. Isn't defining to_json to be avoided altogether in favor of as_json?

Not for non-rails projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants