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

feat(eslint-plugin): consistent-component-styles #1710

Merged

Conversation

reduckted
Copy link
Contributor

Building on the work of @csvn from #1629 (❤️), this PR applies the suggestions and fixes a couple of bugs by:

  • Renaming the rule to consistent-component-styles
  • Adding an option to always use a single string when possible ('string') or always use an array even if it has one element ('array').
  • Retains the type of quotes used by the string when applying the fix.
  • Allows the fix to be applied to template literals as well as string literals.

Copy link

nx-cloud bot commented Jan 23, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 761f435. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 7 targets

Sent with 💌 from NxCloud.

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

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

Project coverage is 89.67%. Comparing base (8294112) to head (9a6176a).
Report is 7 commits behind head on main.

❗ Current head 9a6176a differs from pull request most recent head 761f435. Consider uploading reports for the commit 761f435 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1710      +/-   ##
==========================================
+ Coverage   89.56%   89.67%   +0.10%     
==========================================
  Files         171      174       +3     
  Lines        3202     3244      +42     
  Branches      544      549       +5     
==========================================
+ Hits         2868     2909      +41     
  Misses        198      198              
- Partials      136      137       +1     
Flag Coverage Δ
unittest 89.67% <91.89%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...n/tests/rules/consistent-component-styles/cases.ts 100.00% <100.00%> (ø)
...nt-plugin/src/rules/consistent-component-styles.ts 96.15% <96.15%> (ø)
packages/eslint-plugin/src/index.ts 71.18% <0.00%> (+0.49%) ⬆️

@csvn
Copy link
Contributor

csvn commented Feb 7, 2024

Cool, thanks for taking #1629 over the finish line. I was having issue with the AST query syntax to get single element arrays right, and my tests did not yet pass.

@reduckted
Copy link
Contributor Author

@JamesHenry Is there anything else that's needed in this PR?

@JamesHenry
Copy link
Member

@reduckted @csvn Thanks a lot for your work on this I'm very sorry for the delay in getting it in.

The only tweak I made was to the rule description as I felt it was tied too strongly to an earlier iteration of the rule proposal

JamesHenry
JamesHenry previously approved these changes Mar 15, 2024
@JamesHenry JamesHenry enabled auto-merge (squash) March 15, 2024 20:56
@JamesHenry JamesHenry merged commit b9eef42 into angular-eslint:main Mar 15, 2024
5 checks passed
@reduckted reduckted deleted the feature/consistent-component-styles branch March 15, 2024 22:37
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

3 participants