uselotus / lotus

File .deepsource.toml not found in the default branch of the repository root. Please refer to the docs.

Detected usage of the any type JS-0323
Anti-pattern
Critical
76 occurrences in this check
Unexpected any. Specify a different type
43  sutotal: string;
44  billing_type: string;
45  plan_version_id: string;
46  metadata: any;47}
48
49export interface MarkInvoiceStatusAsPaid {
Unexpected any. Specify a different type
17  total_amount_due: number;
18  subscriptions: CustomerDetailSubscription[];
19  billing_address: string;
20  integrations: any ;21  invoices: InvoiceType[];
22  balance_adjustments: BalanceAdjustments[];
23}
Unexpected any. Specify a different type
28export interface Action {
29  id: number;
30  actor: ActionUserType;
31  verb: any;32  action_object: any;
33  target: any;
34  public: boolean;
Unexpected any. Specify a different type
29  id: number;
30  actor: ActionUserType;
31  verb: any;
32  action_object: any;33  target: any;
34  public: boolean;
35  description: string;
Unexpected any. Specify a different type
30  actor: ActionUserType;
31  verb: any;
32  action_object: any;
33  target: any;34  public: boolean;
35  description: string;
36  timestamp: string;
Unexpected any. Specify a different type
 58        });
 59      },
 60
 61      onError: (error: any) => { 62        toast.error("Error creating metric: " + error.response.data.detail, {
 63          position: toast.POSITION.TOP_CENTER,
 64        });
Unexpected any. Specify a different type
 27const ExperimentResults: FC = () => {
 28  const params = useParams();
 29  const navigate = useNavigate();
 30  const { experimentId } = params as any; 31  const [selectedSubstitution, setSelectedSubstitution] = React.useState<
 32    SpecificResults | undefined
 33  >();
Unexpected any. Specify a different type
264      .validateFields()
265      .then((values) => {
266        const usagecomponentslist: CreateComponent[] = [];
267        const components: any = Object.values(componentsData);268        if (components) {
269          for (let i = 0; i < components.length; i++) {
270            const usagecomponent: CreateComponent = {
Unexpected any. Specify a different type
182    setTargetCustomerFormVisible(false);
183  };
184
185  const handleComponentAdd = (newData: any) => {186    const old = componentsData;
187
188    if (editComponentItem) {
Unexpected any. Specify a different type
168    );
169  };
170
171  const onFinishFailed = (errorInfo: any) => {};172
173  const hideComponentModal = () => {
174    setcomponentVisible(false);
Unexpected any. Specify a different type
 87  }, []);
 88
 89  useEffect(() => {
 90    const initialComponents: any[] = plan.versions[versionIndex].components.map( 91      (component) => {
 92        return {
 93          metric: component.billable_metric.billable_metric_name,
Unexpected any. Specify a different type
 59  const [componentsData, setComponentsData] = useState<any>([]);
 60  const [form] = Form.useForm();
 61  const { setReplacementPlan } = usePlanUpdater();
 62  const [editComponentItem, setEditComponentsItem] = useState<any>(); 63  const [targetCustomerId, setTargetCustomerId] = useState<string>(); // target customer id
 64  const [allPlans, setAllPlans] = useState<PlanType[]>([]);
 65  const [availableBillingTypes, setAvailableBillingTypes] = useState<
Unexpected any. Specify a different type
 56  const [activeVersion, setActiveVersion] = useState<boolean>(false);
 57  const [activeVersionType, setActiveVersionType] = useState<string>();
 58  const navigate = useNavigate();
 59  const [componentsData, setComponentsData] = useState<any>([]); 60  const [form] = Form.useForm();
 61  const { setReplacementPlan } = usePlanUpdater();
 62  const [editComponentItem, setEditComponentsItem] = useState<any>();
Unexpected any. Specify a different type
 58        instance.defaults.headers.common["Authorization"] = `Token ${token}`;
 59        queryClient.invalidateQueries("session");
 60      },
 61      onError: (error: any) => { 62        toast.error(error.response.data.detail, {
 63          position: "top-center",
 64        });
Unexpected any. Specify a different type
178      .validateFields()
179      .then((values) => {
180        const usagecomponentslist: CreateComponent[] = [];
181        const components: any = Object.values(componentsData);182        if (components) {
183          for (let i = 0; i < components.length; i++) {
184            const usagecomponent: CreateComponent = {
Unexpected any. Specify a different type
147    setcomponentVisible(false);
148  };
149
150  const handleComponentEdit = (id: any) => {151    const currentComponent = componentsData.filter((item) => item.id === id)[0];
152
153    setEditComponentsItem(currentComponent);
Unexpected any. Specify a different type
123    setcomponentVisible(true);
124  };
125
126  const handleComponentAdd = (newData: any) => {127    const old = componentsData;
128
129    if (editComponentItem) {
Unexpected any. Specify a different type
113    );
114  };
115
116  const onFinishFailed = (errorInfo: any) => {};117
118  const hideComponentModal = () => {
119    setcomponentVisible(false);
Unexpected any. Specify a different type
23
24export type Actions = {
25  type: ActionTypes;
26  payload?: any;27};
28
29export type ActionCreators = {
Unexpected any. Specify a different type
27const AppRoutes: FC = () => {
28  const [collapse, setCollapse] = useState(false);
29
30  const handleToggle = (event: any) => {31    event.preventDefault();
32    collapse ? setCollapse(false) : setCollapse(true);
33  };
Unexpected any. Specify a different type
 5
 6type Props = {
 7  level?: 1 | 2 | 3 | 4
 8  children: any 9}
10export const Title = ({ level = 1, children }: Props) => {
11  return <Typography.Title level={level}>{children}</Typography.Title>
Unexpected any. Specify a different type
 3type Props = {
 4  color: "gold" | "default";
 5};
 6export const Paper = (props: Props | any) => { 7  return (
 8    <div
 9      {...props}
Unexpected any. Specify a different type
 5
 6type Props = {
 7  level?: 1 | 2 | 3 | 4
 8  children: any 9}
10export const Button = ({ level = 1, children }: Props) => {
11  return BTN
Unexpected any. Specify a different type
 27    });
 28  };
 29
 30  const menuItemsBasic: any = [ 31    {
 32      key: "/dashboard",
 33      icon: <DashboardOutlined />,
Unexpected any. Specify a different type
 75    },
 76  ];
 77
 78  const menuItemsAdmin: any = [ 79    {
 80      key: "/dashboard",
 81      icon: <DashboardOutlined />,