You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improved [`noUnnecessaryConditions`](https://biomejs.dev/linter/rules/no-unnecessary-conditions/) to detect conditions that are always truthy because they check built-in global class instances such as `Date`, `Map`, `Set`, `WeakMap`, and `Error`.
Improved [`noMisleadingReturnType`](https://biomejs.dev/linter/rules/no-misleading-return-type/) to detect `object` return annotations that hide built-in global class instances such as `Date`, `Map`, `Set`, `WeakMap`, and `Error`.
> 71 │ function dateObject(): object {returnnewDate(); }
826
+
│ ^^^^^^^^
827
+
72 │ function mapObject(): object {returnnewMap(); }
828
+
73 │ function setObject(): object {returnnewSet(); }
829
+
830
+
i A wider return type hides the precise types that callers could rely on.
831
+
832
+
i Narrow the return type to match what the function actually returns.
833
+
834
+
i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/9810 for more information or to report possible bugs.
835
+
836
+
i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
i The return type annotation is wider than what the function actually returns.
845
+
846
+
71 │ function dateObject(): object {returnnewDate(); }
847
+
> 72 │ function mapObject(): object {returnnewMap(); }
848
+
│ ^^^^^^^^
849
+
73 │ function setObject(): object {returnnewSet(); }
850
+
74 │ function weakMapObject(): object {returnnewWeakMap(); }
851
+
852
+
i A wider return type hides the precise types that callers could rely on.
853
+
854
+
i Narrow the return type to match what the function actually returns.
855
+
856
+
i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/9810 for more information or to report possible bugs.
857
+
858
+
i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
i The return type annotation is wider than what the function actually returns.
867
+
868
+
71 │ function dateObject(): object {returnnewDate(); }
869
+
72 │ function mapObject(): object {returnnewMap(); }
870
+
> 73 │ function setObject(): object {returnnewSet(); }
871
+
│ ^^^^^^^^
872
+
74 │ function weakMapObject(): object {returnnewWeakMap(); }
873
+
75 │ function errorObject(): object {returnnewError(); }
874
+
875
+
i A wider return type hides the precise types that callers could rely on.
876
+
877
+
i Narrow the return type to match what the function actually returns.
878
+
879
+
i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/9810 for more information or to report possible bugs.
880
+
881
+
i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
i The return type annotation is wider than what the function actually returns.
890
+
891
+
72 │ function mapObject(): object {returnnewMap(); }
892
+
73 │ function setObject(): object {returnnewSet(); }
893
+
> 74 │ function weakMapObject(): object {returnnewWeakMap(); }
894
+
│ ^^^^^^^^
895
+
75 │ function errorObject(): object {returnnewError(); }
896
+
76 │
897
+
898
+
i A wider return type hides the precise types that callers could rely on.
899
+
900
+
i Narrow the return type to match what the function actually returns.
901
+
902
+
i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/9810 for more information or to report possible bugs.
903
+
904
+
i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
i The return type annotation is wider than what the function actually returns.
913
+
914
+
73 │ function setObject(): object {returnnewSet(); }
915
+
74 │ function weakMapObject(): object {returnnewWeakMap(); }
916
+
> 75 │ function errorObject(): object {returnnewError(); }
917
+
│ ^^^^^^^^
918
+
76 │
919
+
920
+
i A wider return type hides the precise types that callers could rely on.
921
+
922
+
i Narrow the return type to match what the function actually returns.
923
+
924
+
i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/9810 for more information or to report possible bugs.
925
+
926
+
i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
i The type being checked can never be falsy, making this condition redundant.
893
+
894
+
i Remove the condition.
895
+
896
+
i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
897
+
898
+
i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
0 commit comments