Skip to content

feat(eslint-plugin): add rules to ban experimental and developer preview #2037

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

json-derulo
Copy link
Contributor

@json-derulo json-derulo commented Sep 13, 2024

Fixes #1721, Fixes #2033

Current status:

  • Coverage of new code is below 90% which fails the checks, however the uncovered lines marked by the tool seem strange
  • When importing and using a constant from an external file, currently there is no error raised, but it should

Copy link

nx-cloud bot commented Sep 13, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit dc80fb8. 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


🟥 Failed Commands
nx run-many -t build
✅ Successfully ran 5 targets

Sent with 💌 from NxCloud.

@json-derulo json-derulo force-pushed the no-experimental-dev-preview branch from 2502f55 to 8b8c540 Compare September 13, 2024 17:23
@JamesHenry
Copy link
Member

@json-derulo I pushed a commit which facilitates the type checked rule tests

Copy link

codecov bot commented Nov 23, 2024

Codecov Report

Attention: Patch coverage is 82.24299% with 19 lines in your changes missing coverage. Please review.

Project coverage is 90.79%. Comparing base (8d0c6f3) to head (0a5d5a4).

Files with missing lines Patch % Lines
packages/eslint-plugin/src/utils/jsdoc.ts 68.85% 13 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2037      +/-   ##
==========================================
- Coverage   91.05%   90.79%   -0.26%     
==========================================
  Files         181      186       +5     
  Lines        3521     3630     +109     
  Branches      587      606      +19     
==========================================
+ Hits         3206     3296      +90     
- Misses        164      177      +13     
- Partials      151      157       +6     
Flag Coverage Δ
unittest 90.79% <82.24%> (-0.26%) ⬇️

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

Files with missing lines Coverage Δ
packages/eslint-plugin/src/index.ts 73.43% <ø> (+0.85%) ⬆️
...es/eslint-plugin/src/rules/no-developer-preview.ts 100.00% <100.00%> (ø)
...ackages/eslint-plugin/src/rules/no-experimental.ts 100.00% <100.00%> (ø)
...t-plugin/tests/rules/no-developer-preview/cases.ts 100.00% <100.00%> (ø)
...eslint-plugin/tests/rules/no-experimental/cases.ts 100.00% <100.00%> (ø)
packages/eslint-plugin/src/utils/jsdoc.ts 68.85% <68.85%> (ø)

@json-derulo json-derulo force-pushed the no-experimental-dev-preview branch 6 times, most recently from 117e369 to dc935d3 Compare November 23, 2024 19:33
@json-derulo json-derulo force-pushed the no-experimental-dev-preview branch 8 times, most recently from 77b0117 to 0a5d5a4 Compare November 25, 2024 21:24
@json-derulo json-derulo force-pushed the no-experimental-dev-preview branch from 0a5d5a4 to dc80fb8 Compare November 26, 2024 20:01
@pumano
Copy link
Contributor

pumano commented Nov 29, 2024

Very useful rules

@JamesHenry
Copy link
Member

@json-derulo Do you have any plans to continue working on these please?

@json-derulo
Copy link
Contributor Author

@JamesHenry yes I am planning to continue work on this PR, probably it will take a few weeks though because at the moment I have limited availability.

What's not working currently is that for some reason the annotated code is not always detected when imported from an external file, which I found while implementing the tests. Also, the code coverage is marked as insufficient, however the uncovered lines reported by the tool look strange.

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