airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

Function useContextMenu has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const useContextMenu = (
  chartId: number,
  formData: BaseFormData & { [key: string]: any },
  onSelection?: (...args: any) => void,
  displayedItems?: ContextMenuItem[] | ContextMenuItem,

    Function ServerPagination has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const ServerPagination: StoryFn<typeof Table> = args => {
      const [data, setData] = useState(generateData(0, 5));
      const [loading, setLoading] = useState(false);
    
      const handleChange: OnChangeFunction<BasicData> = (
    Severity: Minor
    Found in superset-frontend/src/components/Table/Table.stories.tsx - About 1 hr to fix

      Function selectIndicatorsForChart has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const selectIndicatorsForChart = (
        chartId: number,
        filters: { [key: number]: Filter },
        datasources: { [key: string]: Datasource },
        chart: any,

        Function SqlLab has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function SqlLab() {
          const lastInitializedAt = useSelector<SqlLabRootState, number>(
            state => state.sqlLab.queriesLastUpdate || 0,
          );
          const { data, isLoading, isError, error, fulfilledTimeStamp } =
        Severity: Minor
        Found in superset-frontend/src/pages/SqlLab/index.tsx - About 1 hr to fix

          Function cleanDeletedParents has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const cleanDeletedParents = (values: NativeFiltersForm | null) => {
              const modifiedParentFilters = new Set<string>();
              const updatedFilterConfigMap = Object.keys(filterConfigMap).reduce(
                (acc, key) => {
                  const filter = filterConfigMap[key];

            Function saveDashboard has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              saveDashboard() {
                const { saveType, newDashName } = this.state;
                const {
                  dashboardTitle,
                  dashboardInfo,
            Severity: Minor
            Found in superset-frontend/src/dashboard/components/SaveModal.tsx - About 1 hr to fix

              Function useDefaultValue has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const useDefaultValue = (
                formFilter?: NativeFiltersFormItem,
                filterToEdit?: Filter,
              ): [boolean, boolean, string, Function] => {
                const enableEmptyFilter = !!formFilter?.controlValues?.enableEmptyFilter;

                Function constructor has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  constructor(config: ChartPropsConfig & { formData?: FormData } = {}) {
                    const {
                      annotationData = {},
                      datasource = {},
                      formData = {} as FormData,

                  Function actions.UPDATE_FORM_DATA_BY_DATASOURCE has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      [actions.UPDATE_FORM_DATA_BY_DATASOURCE]() {
                        const newFormData = { ...state.form_data };
                        const { prevDatasource, newDatasource } = action;
                        const controls = { ...state.controls };
                        const controlsTransferred = [];
                  Severity: Minor
                  Found in superset-frontend/src/explore/reducers/exploreReducer.js - About 1 hr to fix

                    Function sliceEntitiesReducer has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export default function sliceEntitiesReducer(
                      state = initSliceEntities,
                      action,
                    ) {
                      const actionHandlers = {
                    Severity: Minor
                    Found in superset-frontend/src/dashboard/reducers/sliceEntities.js - About 1 hr to fix

                      Function constructor has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        constructor() {
                          super({
                            buildQuery,
                            controlPanel,
                            loadChart: () => import('../../EchartsTimeseries'),

                        Function render has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          render() {
                            const {
                              showTrendLine,
                              height,
                              kickerFontSize,

                          Function transform has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            transform(
                              targetVizType: string,
                              exploreState: Record<string, any>,
                            ): {
                              formData: QueryFormData;
                          Severity: Minor
                          Found in superset-frontend/src/explore/controlUtils/standardizedFormData.ts - About 1 hr to fix

                            Function buildQuery has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export default function buildQuery(formData: PivotTableQueryFormData) {
                              const { groupbyColumns = [], groupbyRows = [], extra_form_data } = formData;
                              const time_grain_sqla =
                                extra_form_data?.time_grain_sqla || formData.time_grain_sqla;
                            
                            

                              Function useGetTimeRangeLabel has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const useGetTimeRangeLabel = (adhocFilter: AdhocFilter): Results => {
                                const [actualTimeRange, setActualTimeRange] = useState<Results>({});
                              
                                useEffect(() => {
                                  if (

                                Function renderHeader has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const renderHeader = () => {
                                    const element: HTMLInputElement | null = tableNameRef.current;
                                    let trigger: string[] = [];
                                    if (element && element.offsetWidth < element.scrollWidth) {
                                      trigger = ['hover'];
                                Severity: Minor
                                Found in superset-frontend/src/SqlLab/components/TableElement/index.tsx - About 1 hr to fix

                                  Function renderErrorMessage has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    renderErrorMessage(queryResponse: ChartErrorType) {
                                      const {
                                        chartId,
                                        chartAlert,
                                        chartStackTrace,
                                  Severity: Minor
                                  Found in superset-frontend/src/components/Chart/Chart.tsx - About 1 hr to fix

                                    Function setDatabaseModel has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      const setDatabaseModel = (database_name: string) => {
                                        if (database_name === 'Other') {
                                          // Allow users to connect to DB via legacy SQLA form
                                          setDB({
                                            type: ActionType.DbSelected,
                                    Severity: Minor
                                    Found in superset-frontend/src/features/databases/DatabaseModal/index.tsx - About 1 hr to fix

                                      Function useFilterControlFactory has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const useFilterControlFactory = (
                                        dataMaskSelected: DataMaskStateWithId,
                                        onFilterSelectionChange: (filter: Filter, dataMask: DataMask) => void,
                                      ) => {
                                        const filters = useFilters();

                                        Function fetchDashboards has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          const fetchDashboards = async (
                                            filterValue = '',
                                            page: number,
                                            pageSize: number,
                                          ) => {
                                        Severity: Minor
                                        Found in superset-frontend/src/pages/ChartList/index.tsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language