Skip to content

feat(eslint-plugin-template): [button-has-type] add option to ignore missing type #2326

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

Conversation

reduckted
Copy link
Contributor

Fixes #2193

Adds an ignoreWithDirectives option that specifies the names of directives (or attributes) that, when present on the button element, will cause the button-has-type rule to not report a problem.

I went with "ignore" rather than "allow", but I'm happy to change it to something else if needed.

I've still kept the "invalidType" check, so even if the "missingType" check is skipped, if you specify a type attribute with an invalid value, the rule will still report a problem.

Copy link

nx-cloud bot commented Mar 18, 2025

View your CI Pipeline Execution ↗ for commit fe64ac5.

Command Status Duration Result
nx run-many -t test ✅ Succeeded 22s View ↗
nx run-many -t build ✅ Succeeded 12s View ↗
nx run-many -t e2e-suite --parallel 1 ✅ Succeeded 27s View ↗
nx run-many -t test --codeCoverage ✅ Succeeded 1m 7s View ↗
nx run-many -t build,typecheck,check-rule-docs,... ✅ Succeeded 38s View ↗
nx-cloud record -- pnpm nx sync:check ✅ Succeeded 4s View ↗
nx-cloud record -- pnpm format-check ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2025-03-18 10:27:37 UTC

Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.36%. Comparing base (b55ccf1) to head (fe64ac5).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2326      +/-   ##
==========================================
+ Coverage   92.33%   92.36%   +0.02%     
==========================================
  Files         181      181              
  Lines        3367     3377      +10     
  Branches      685      689       +4     
==========================================
+ Hits         3109     3119      +10     
  Misses        200      200              
  Partials       58       58              
Flag Coverage Δ
unittest 92.36% <100.00%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
...slint-plugin-template/src/rules/button-has-type.ts 100.00% <100.00%> (ø)
...ugin-template/tests/rules/button-has-type/cases.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JamesHenry JamesHenry merged commit 0217b53 into angular-eslint:main Mar 22, 2025
7 checks passed
@reduckted reduckted deleted the feature/2193-button-has-type-ignore-list branch March 22, 2025 09:00
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.

[@angular-eslint/template/button-has-type] support allowList
2 participants