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

ci: Add lint rule for mandatory curly braces #9348

Conversation

mtrezza
Copy link
Member

@mtrezza mtrezza commented Oct 16, 2024

Add two lint rules for braces and blocks:

  1. "curly": ["error", "all"]

    For example, this:

    if (body.hint) options.hint = body.hint;

    would need to be changed to:

    if (body.hint) {
      options.hint = body.hint;
    }
  2. "block-spacing": ["error", "always"]

    For example, this:

    if (body.hint) {options.hint = body.hint};

    would need to be changed to:

    if (body.hint) { options.hint = body.hint; }
  3. A MongoDB URL related code refactor was necessary, see ci: Add lint rule for mandatory curly braces #9348 (comment)

Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title ci: add lint rule for mandatory curly brackets ci: Add lint rule for mandatory curly brackets Oct 16, 2024
Copy link

parse-github-assistant bot commented Oct 16, 2024

Thanks for opening this pull request!

  • ❌ Please link an issue that describes the reason for this pull request, otherwise your pull request will be closed. Make sure to write it as Closes: #123 in the PR description, so I can recognize it.

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 93.87755% with 3 lines in your changes missing coverage. Please review.

Project coverage is 93.11%. Comparing base (714acaa) to head (1986f1c).
Report is 3 commits behind head on alpha.

Files with missing lines Patch % Lines
src/GraphQL/transformers/mutation.js 50.00% 2 Missing ⚠️
src/SchemaMigrations/DefinedSchemas.js 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            alpha    #9348      +/-   ##
==========================================
- Coverage   93.49%   93.11%   -0.38%     
==========================================
  Files         186      186              
  Lines       14811    14811              
==========================================
- Hits        13848    13792      -56     
- Misses        963     1019      +56     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mtrezza mtrezza changed the title ci: Add lint rule for mandatory curly brackets ci: Add lint rule for mandatory curly braces Oct 16, 2024
@mtrezza mtrezza merged commit dfd5a8e into parse-community:alpha Oct 16, 2024
28 of 29 checks passed
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.4.0-alpha.3

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Oct 22, 2024
@mtrezza mtrezza deleted the ci-add-lint-rule-for-mandatory-curly-brackets branch October 30, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released-alpha Released as alpha version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants