forked from cartant/eslint-plugin-rxjs
-
Notifications
You must be signed in to change notification settings - Fork 3
feat(strict): add strict configuration #41
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LCOV of commit
|
a763510
to
58a2997
Compare
Adding `as const` will cause the generated type definitions to show `false` instead of `boolean`, which is helpful for developers exploring the config's contents via intellisense.
JasonWeinzierl
added a commit
that referenced
this pull request
Nov 24, 2024
BREAKING CHANGE: allowExplicitAny now defaults to `true` instead of `false`. This change was made for several reasons: 1. To align with other rules in this codebase dealing with explicit `any` (namely `throw-error`, which allows `any` by default). 2. To align with the rule's name: to a casual reader, this rule seems to only ban implicit `any`, not explicit too. 3. Lax codebases often change allowExplicitAny to `true`, or they disable this rule entirely. - By relaxing the default options, developers will be encouraged to at least add an explicit annotation, and stricter codebases can re-opt-in to banning `any`. - Strict codebases likely already have typescript-eslint's no-explicit-any turned on, so this shouldn't reduce practical coverage. 5. The upcoming `strict` config will set this option back to `false`. See #36 and #41 .
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces a new configuration
strict
for enforcing more difficult-yet-generally-useful RxJS rules/conventions.recommended
.no-explicit-generics
no-exposed-subjects
no-ignored-default-value
no-ignored-error
no-ignored-observable
no-subclass
no-topromise
*prefer-observer
*prefer-root-operators
*throw-error
*recommended
. See Changes to therecommended
config #35 .rule.meta.docs.recommended
metadata stays in sync with the configs.Resolves #36 .