diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts index f2e88b139..44b26be9e 100644 --- a/superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts +++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts @@ -225,11 +225,11 @@ function setFilterBarOrientation(orientation: 'vertical' | 'horizontal') { } } -function openMoreFilters(intercetFilterState = true) { +function openMoreFilters(waitFilterState = true) { interceptFilterState(); cy.getBySel('dropdown-container-btn').click(); - if (intercetFilterState) { + if (waitFilterState) { cy.wait('@postFilterState'); } } @@ -568,7 +568,7 @@ describe('Native filters', () => { ]); enterNativeFilterEditModal(); selectFilter(1); - // Select dependdent option and auto use platform for genre + // Select dependent option and auto use platform for genre cy.get(nativeFilters.filterConfigurationSections.displayedSection).within( () => { cy.contains('Values are dependent on other filters') diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/utils.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/utils.ts index 3909d7815..7b89b75a4 100644 --- a/superset-frontend/cypress-base/cypress/e2e/dashboard/utils.ts +++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/utils.ts @@ -204,9 +204,9 @@ export function expandFilterOnLeftPanel() { } /** ************************************************************************ - * Collapes Native Filter from the left panel on dashboard + * Collapses Native Filter from the left panel on dashboard * @returns {None} - * @summary helper for collape native filter + * @summary helper for collapse native filter ************************************************************************* */ export function collapseFilterOnLeftPanel() { cy.get(nativeFilters.filterFromDashboardView.collapse) @@ -429,7 +429,7 @@ export function undoDeleteNativeFilter() { /** ************************************************************************ * Check Native Filter tooltip content - * @param index: tooltip indext to check + * @param index: tooltip index to check * @param value: tooltip value to check * @return {null} * @summary helper for checking native filter tooltip content by index @@ -475,10 +475,10 @@ export function applyAdvancedTimeRangeFilterOnDashboard( } /** ************************************************************************ - * Input default valule in Native filter in filter settings + * Input default value in Native filter in filter settings * @param defaultValue: default value for native filter * @return {null} - * @summary helper for input default valule in Native filter in filter settings + * @summary helper for input default value in Native filter in filter settings ************************************************************************* */ export function inputNativeFilterDefaultValue( defaultValue: string, diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/_skip.AdhocFilters.test.ts b/superset-frontend/cypress-base/cypress/e2e/explore/_skip.AdhocFilters.test.ts index d8027d327..0edcf77d5 100644 --- a/superset-frontend/cypress-base/cypress/e2e/explore/_skip.AdhocFilters.test.ts +++ b/superset-frontend/cypress-base/cypress/e2e/explore/_skip.AdhocFilters.test.ts @@ -89,7 +89,7 @@ describe.skip('AdhocFilters', () => { cy.wait('@filterValues'); // selecting a new filter should auto-open the popup, - // so the tabshould be visible by now + // so the tab should be visible by now cy.get('#filter-edit-popover #adhoc-filter-edit-tabs-tab-SQL').click(); cy.get('#filter-edit-popover .ace_content').click(); cy.get('#filter-edit-popover .ace_text-input').type(filterContent); diff --git a/superset-frontend/cypress-base/cypress/e2e/sqllab/_skip.sourcePanel.index.test.js b/superset-frontend/cypress-base/cypress/e2e/sqllab/_skip.sourcePanel.index.test.js index ece158171..e746489ce 100644 --- a/superset-frontend/cypress-base/cypress/e2e/sqllab/_skip.sourcePanel.index.test.js +++ b/superset-frontend/cypress-base/cypress/e2e/sqllab/_skip.sourcePanel.index.test.js @@ -23,7 +23,7 @@ describe.skip('SqlLab datasource panel', () => { cy.visit('/sqllab'); }); - // TODO the test bellow is flaky, and has been disabled for the time being + // TODO the test below is flaky, and has been disabled for the time being // (notice the `it.skip`) it('creates a table preview when a database, schema, and table are selected', () => { cy.intercept('/superset/table/**').as('tableMetadata'); diff --git a/superset-frontend/cypress-base/cypress/support/e2e.ts b/superset-frontend/cypress-base/cypress/support/e2e.ts index 6556d8e5e..7d17935e3 100644 --- a/superset-frontend/cypress-base/cypress/support/e2e.ts +++ b/superset-frontend/cypress-base/cypress/support/e2e.ts @@ -36,7 +36,7 @@ const { getConfig, setConfig } = failOnConsoleError({ ], }); -// Set infividual tests to allow certain console erros to NOT fail, e.g +// Set individual tests to allow certain console errors to NOT fail, e.g // cy.allowConsoleErrors(['foo', /^some bar-regex.*/]); // This will be reset between tests. Cypress.Commands.addAll({ diff --git a/superset-frontend/packages/superset-ui-chart-controls/CHANGELOG.md b/superset-frontend/packages/superset-ui-chart-controls/CHANGELOG.md index 3219817e0..8cd9131c2 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/CHANGELOG.md +++ b/superset-frontend/packages/superset-ui-chart-controls/CHANGELOG.md @@ -26,4 +26,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Features -- add certified icon to columoption ([#1330](https://github.com/apache-superset/superset-ui/issues/1330)) ([a415c41](https://github.com/apache-superset/superset-ui/commit/a415c413954bc9c093ab5dfde62d458cf3224073)) +- add certified icon to columnoption ([#1330](https://github.com/apache-superset/superset-ui/issues/1330)) ([a415c41](https://github.com/apache-superset/superset-ui/commit/a415c413954bc9c093ab5dfde62d458cf3224073)) diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/operators/utils/extractExtraMetrics.test.ts b/superset-frontend/packages/superset-ui-chart-controls/test/operators/utils/extractExtraMetrics.test.ts index c2405a863..75d7bd224 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/operators/utils/extractExtraMetrics.test.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/test/operators/utils/extractExtraMetrics.test.ts @@ -125,7 +125,7 @@ test('returns empty array if timeseries_limit_metric and x_axis_sort are include ).toEqual([]); }); -test('returns emoty array if timeseries_limit_metric is an empty array', () => { +test('returns empty array if timeseries_limit_metric is an empty array', () => { expect( extractExtraMetrics({ ...baseFormData, diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/utils/defineSavedMetrics.test.tsx b/superset-frontend/packages/superset-ui-chart-controls/test/utils/defineSavedMetrics.test.tsx index 218b2e580..79910895b 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/utils/defineSavedMetrics.test.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/test/utils/defineSavedMetrics.test.tsx @@ -54,7 +54,7 @@ describe('defineSavedMetrics', () => { expect(defineSavedMetrics({ ...dataset, metrics: undefined })).toEqual([]); }); - it('returns default saved metrics if souce is a Query', () => { + it('returns default saved metrics if source is a Query', () => { expect(defineSavedMetrics(testQuery as QueryResponse)).toEqual( DEFAULT_METRICS, ); diff --git a/superset-frontend/packages/superset-ui-core/src/color/ColorSchemeRegistry.ts b/superset-frontend/packages/superset-ui-core/src/color/ColorSchemeRegistry.ts index 2601be82e..7bb845aa2 100644 --- a/superset-frontend/packages/superset-ui-core/src/color/ColorSchemeRegistry.ts +++ b/superset-frontend/packages/superset-ui-core/src/color/ColorSchemeRegistry.ts @@ -31,7 +31,7 @@ export default class ColorSchemeRegistry extends RegistryWithDefaultKey { get(key?: string, strict = false) { const target = super.get(key) as T | undefined; - // fallsback to default scheme if any + // falls back to default scheme if any if (!strict && !target) { const defaultKey = super.getDefaultKey(); if (defaultKey) { diff --git a/superset-frontend/packages/superset-ui-core/src/query/types/Query.ts b/superset-frontend/packages/superset-ui-core/src/query/types/Query.ts index b6b1fd3a6..4feba1731 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/types/Query.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/types/Query.ts @@ -283,7 +283,7 @@ export enum QueryState { TimedOut = 'timed_out', } -// Inidcates a Query's state is still processing +// Indicates a Query's state is still processing export const runningQueryStateList: QueryState[] = [ QueryState.Running, QueryState.Started, diff --git a/superset-frontend/packages/superset-ui-core/src/query/types/QueryFormData.ts b/superset-frontend/packages/superset-ui-core/src/query/types/QueryFormData.ts index ea2f0d082..ddc467b2c 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/types/QueryFormData.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/types/QueryFormData.ts @@ -105,7 +105,7 @@ export type QueryFormExtraFilter = { } ); -/** These properties will be appended to those pre-existing in the form data/query object */ +/** These properties will be appended to those preexisting in the form data/query object */ export type ExtraFormDataAppend = { adhoc_filters?: AdhocFilter[]; filters?: QueryObjectFilterClause[]; diff --git a/superset-frontend/packages/superset-ui-core/test/connection/callApi/callApi.test.ts b/superset-frontend/packages/superset-ui-core/test/connection/callApi/callApi.test.ts index 81c8e2d15..1067945a7 100644 --- a/superset-frontend/packages/superset-ui-core/test/connection/callApi/callApi.test.ts +++ b/superset-frontend/packages/superset-ui-core/test/connection/callApi/callApi.test.ts @@ -218,7 +218,7 @@ describe('callApi()', () => { const unstringified = (calls[0][1] as RequestInit).body as FormData; const hasCorruptKey = unstringified.has('corrupt'); expect(hasCorruptKey).toBeFalsy(); - // When a corrupt attribute is encountred, a console.error call is made with info about the corrupt attribute + // When a corrupt attribute is encountered, a console.error call is made with info about the corrupt attribute // eslint-disable-next-line no-console expect(console.error).toHaveBeenCalledTimes(1); }); diff --git a/superset-frontend/packages/superset-ui-core/test/query/processExtraFormData.test.ts b/superset-frontend/packages/superset-ui-core/test/query/processExtraFormData.test.ts index 136a45803..b688b03ca 100644 --- a/superset-frontend/packages/superset-ui-core/test/query/processExtraFormData.test.ts +++ b/superset-frontend/packages/superset-ui-core/test/query/processExtraFormData.test.ts @@ -19,7 +19,7 @@ import { overrideExtraFormData } from '../../src/query/processExtraFormData'; describe('overrideExtraFormData', () => { - it('should assign allowed non-existent value', () => { + it('should assign allowed nonexistent value', () => { expect( overrideExtraFormData( { @@ -82,7 +82,7 @@ describe('overrideExtraFormData', () => { }); }); - it('should override pre-existing extra value', () => { + it('should override preexisting extra value', () => { expect( overrideExtraFormData( { diff --git a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-pivot-table/testData.ts b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-pivot-table/testData.ts index 0e6457d0c..e29d6ba09 100644 --- a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-pivot-table/testData.ts +++ b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-pivot-table/testData.ts @@ -91,7 +91,7 @@ export const basicData = { data: [ { location: 'AMEA', - program_language: 'Javscript', + program_language: 'JavaScript', Count: 134, 'Most Recent Data': '2022-07-25 13:00:00.000', }, diff --git a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-table/Table.stories.tsx b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-table/Table.stories.tsx index 1ec9a5bae..78264b0ec 100644 --- a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-table/Table.stories.tsx +++ b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-table/Table.stories.tsx @@ -96,7 +96,7 @@ const expandColumns = memoizeOne(expandArray); /** * Load sample data for testing * @param props the original props passed to SuperChart - * @param pageLength number of records perpage + * @param pageLength number of records per page * @param rows the target number of records * @param cols the target number of columns */ diff --git a/superset-frontend/plugins/legacy-plugin-chart-partition/src/Partition.js b/superset-frontend/plugins/legacy-plugin-chart-partition/src/Partition.js index e0ebd559a..a71bb63d6 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-partition/src/Partition.js +++ b/superset-frontend/plugins/legacy-plugin-chart-partition/src/Partition.js @@ -331,7 +331,7 @@ function Icicle(element, props) { tooltip.interrupt().transition().duration(250).style('opacity', 0); }); - // When clicking a subdivision, the vis will zoom in to it + // When clicking a subdivision, the vis will zoom into it function click(d) { if (!d.children) { if (d.parent) { diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/Heatmap.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/Heatmap.tsx index 9c603b535..0a70639e8 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/Heatmap.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/Heatmap.tsx @@ -65,7 +65,7 @@ export const getLayer: getLayerType = ( ?.reverse() as Color[]; return new HeatmapLayer({ - id: `heatmp-layer-${fd.slice_id}` as const, + id: `heatmap-layer-${fd.slice_id}` as const, data, intensity, radiusPixels, diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/controlPanel.ts index eed6bbe2d..c00c87fbb 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/controlPanel.ts @@ -63,7 +63,7 @@ const config: ControlPanelConfig = { name: 'intensity', config: { type: 'SelectControl', - label: t('Intesity'), + label: t('Intensity'), description: t( 'Intensity is the value multiplied by the weight to obtain the final weight', ), diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx index 1c58721ff..1ab773698 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx @@ -169,7 +169,7 @@ export const showControls: CustomControlItem = { default: false, description: t( 'Whether to show extra controls or not. Extra controls ' + - 'include things like making mulitBar charts stacked ' + + 'include things like making multiBar charts stacked ' + 'or side by side.', ), }, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/controlPanel.tsx index ae9dc0afa..8e54b9590 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/controlPanel.tsx @@ -130,7 +130,7 @@ const config: ControlPanelConfig = { default: false, description: t( 'Whether to show extra controls or not. Extra controls ' + - 'include things like making mulitBar charts stacked ' + + 'include things like making multiBar charts stacked ' + 'or side by side.', ), }, diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Graph/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Graph/transformProps.test.ts index 3c2e6e238..e7f0b4794 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Graph/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Graph/transformProps.test.ts @@ -156,7 +156,7 @@ describe('EchartsGraph transformProps', () => { ); }); - it('should transform chart props for viz with category and falsey normalization', () => { + it('should transform chart props for viz with category and falsy normalization', () => { const formData: SqlaFormData = { colorScheme: 'bnbColors', datasource: '3__table', diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index a87371f44..390be5733 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -1038,7 +1038,7 @@ export default function TableChart( useLayoutEffect(() => { // After initial load the table should resize only when the new sizes - // Are not only scrollbar updates, otherwise, the table would twicth + // Are not only scrollbar updates, otherwise, the table would twitch const scrollBarSize = getScrollBarSize(); const { width: tableWidth, height: tableHeight } = tableSize; // Table is increasing its original size diff --git a/superset-frontend/src/SqlLab/components/AceEditorWrapper/useAnnotations.test.ts b/superset-frontend/src/SqlLab/components/AceEditorWrapper/useAnnotations.test.ts index 0f17fdafc..99377c43b 100644 --- a/superset-frontend/src/SqlLab/components/AceEditorWrapper/useAnnotations.test.ts +++ b/superset-frontend/src/SqlLab/components/AceEditorWrapper/useAnnotations.test.ts @@ -157,7 +157,7 @@ test('returns server error description', async () => { ); }); -test('returns sesion expire description when CSRF token expired', async () => { +test('returns session expire description when CSRF token expired', async () => { const errorMessage = 'CSRF token expired'; fetchMock.post( queryValidationApiRoute, diff --git a/superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx b/superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx index f3b9ef218..68353ad1f 100644 --- a/superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx +++ b/superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx @@ -162,7 +162,7 @@ describe('QueryAutoRefresh', () => { expect(fetchMock.calls(refreshApi)).toHaveLength(1); }); - it('Does not fail and attempts to refresh when given pending query and invlaid query', async () => { + it('Does not fail and attempts to refresh when given pending query and invalid query', async () => { const store = mockStore(); fetchMock.get(refreshApi, { result: [ diff --git a/superset-frontend/src/SqlLab/components/QueryAutoRefresh/index.tsx b/superset-frontend/src/SqlLab/components/QueryAutoRefresh/index.tsx index 0c5f55054..ca9906a75 100644 --- a/superset-frontend/src/SqlLab/components/QueryAutoRefresh/index.tsx +++ b/superset-frontend/src/SqlLab/components/QueryAutoRefresh/index.tsx @@ -43,7 +43,7 @@ export interface QueryAutoRefreshProps { queriesLastUpdate: number; } -// returns true if the Query.state matches one of the specifc values indicating the query is still processing on server +// returns true if the Query.state matches one of the specific values indicating the query is still processing on server export const isQueryRunning = (q: Query): boolean => runningQueryStateList.includes(q?.state); diff --git a/superset-frontend/src/SqlLab/fixtures.ts b/superset-frontend/src/SqlLab/fixtures.ts index 257391654..d673c24bc 100644 --- a/superset-frontend/src/SqlLab/fixtures.ts +++ b/superset-frontend/src/SqlLab/fixtures.ts @@ -31,7 +31,7 @@ import { ISaveableDatasource } from 'src/SqlLab/components/SaveDatasetModal'; export const mockedActions = sinon.stub({ ...actions }); -export const alert = { bsStyle: 'danger', msg: 'Ooops', id: 'lksvmcx32' }; +export const alert = { bsStyle: 'danger', msg: 'Oops', id: 'lksvmcx32' }; export const table = { dbId: 1, selectStar: 'SELECT * FROM ab_user', diff --git a/superset-frontend/src/components/Button/Button.test.tsx b/superset-frontend/src/components/Button/Button.test.tsx index bf037f104..bbb72e5d4 100644 --- a/superset-frontend/src/components/Button/Button.test.tsx +++ b/superset-frontend/src/components/Button/Button.test.tsx @@ -41,7 +41,6 @@ test('does not handle onClicks when disabled', () => { // test stories from the storybook! test('All the sorybook gallery variants mount', () => { const { getAllByRole } = render(); - const permutationCount = Object.values(buttonStyles.options).filter(o => o).length * Object.values(buttonSizes.options).length; diff --git a/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx index f88b55f75..7786e84ad 100644 --- a/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx @@ -231,7 +231,7 @@ export default function DrillByModal({ config.column, config.groupbyFieldName, ); - acc.overridenGroupbyFields.add(config.groupbyFieldName); + acc.overriddenGroupbyFields.add(config.groupbyFieldName); } const adhocFilterFieldName = config?.adhocFilterFieldName || DEFAULT_ADHOC_FILTER_FIELD_NAME; @@ -241,14 +241,14 @@ export default function DrillByModal({ simpleFilterToAdhoc(filter), ), ]; - acc.overridenAdhocFilterFields.add(adhocFilterFieldName); + acc.overriddenAdhocFilterFields.add(adhocFilterFieldName); return acc; }, { formData: {}, - overridenGroupbyFields: new Set(), - overridenAdhocFilterFields: new Set(), + overriddenGroupbyFields: new Set(), + overriddenAdhocFilterFields: new Set(), }, ), [getNewGroupby], @@ -288,14 +288,14 @@ export default function DrillByModal({ if (index === 0) { return formData; } - const { formData: overrideFormData, overridenAdhocFilterFields } = + const { formData: overrideFormData, overriddenAdhocFilterFields } = getFormDataChangesFromConfigs(drillByConfigs.slice(0, index)); const newFormData = { ...formData, ...overrideFormData, }; - overridenAdhocFilterFields.forEach(adhocFilterField => ({ + overriddenAdhocFilterFields.forEach(adhocFilterField => ({ ...newFormData, [adhocFilterField]: [ ...formData[adhocFilterField], diff --git a/superset-frontend/src/components/ErrorMessage/getErrorMessageComponentRegistry.test.tsx b/superset-frontend/src/components/ErrorMessage/getErrorMessageComponentRegistry.test.tsx index 5a4e94255..03c7c4be7 100644 --- a/superset-frontend/src/components/ErrorMessage/getErrorMessageComponentRegistry.test.tsx +++ b/superset-frontend/src/components/ErrorMessage/getErrorMessageComponentRegistry.test.tsx @@ -29,7 +29,7 @@ const OVERRIDE_ERROR_MESSAGE_COMPONENT = (_: ErrorMessageComponentProps) => (
Custom error
); -test('should return undefined for a non existent key', () => { +test('should return undefined for a nonexistent key', () => { expect(getErrorMessageComponentRegistry().get('INVALID_KEY')).toEqual( undefined, ); diff --git a/superset-frontend/src/components/ListView/utils.ts b/superset-frontend/src/components/ListView/utils.ts index c70741df9..c02708151 100644 --- a/superset-frontend/src/components/ListView/utils.ts +++ b/superset-frontend/src/components/ListView/utils.ts @@ -238,7 +238,7 @@ export function useListViewState({ ); const columnsWithSelect = useMemo(() => { - // add exact filter type so filters with falsey values are not filtered out + // add exact filter type so filters with falsy values are not filtered out const columnsWithFilter = columns.map(f => ({ ...f, filter: 'exact' })); return bulkSelectMode ? [bulkSelectColumnConfig, ...columnsWithFilter] diff --git a/superset-frontend/src/components/MetadataBar/MetadataBar.test.tsx b/superset-frontend/src/components/MetadataBar/MetadataBar.test.tsx index 32d9746d4..d06efbc07 100644 --- a/superset-frontend/src/components/MetadataBar/MetadataBar.test.tsx +++ b/superset-frontend/src/components/MetadataBar/MetadataBar.test.tsx @@ -158,7 +158,7 @@ test('renders underlined text and emits event when clickable', () => { expect(style.textDecoration).toBe('underline'); }); -test('renders clicable items with blue icons when the bar is collapsed', async () => { +test('renders clickable items with blue icons when the bar is collapsed', async () => { await runWithBarCollapsed(async () => { const onClick = jest.fn(); const items = [{ ...ITEMS[0], onClick }, ITEMS[1]]; diff --git a/superset-frontend/src/components/MetadataBar/MetadataBar.tsx b/superset-frontend/src/components/MetadataBar/MetadataBar.tsx index 2b809925a..2a5826480 100644 --- a/superset-frontend/src/components/MetadataBar/MetadataBar.tsx +++ b/superset-frontend/src/components/MetadataBar/MetadataBar.tsx @@ -109,8 +109,8 @@ const StyledItem = styled.div<{ `} `; -// Make sure big tootips are truncated -const TootipContent = styled.div` +// Make sure big tooltips are truncated +const TooltipContent = styled.div` display: -webkit-box; -webkit-line-clamp: 20; -webkit-box-orient: vertical; @@ -161,7 +161,7 @@ const Item = ({ return isTruncated || collapsed || (tooltip && tooltip !== title) ? ( {tooltip}} + title={{tooltip}} > {content} diff --git a/superset-frontend/src/components/Table/Table.stories.tsx b/superset-frontend/src/components/Table/Table.stories.tsx index 2875e519c..c415cc709 100644 --- a/superset-frontend/src/components/Table/Table.stories.tsx +++ b/superset-frontend/src/components/Table/Table.stories.tsx @@ -121,14 +121,14 @@ const basicData: BasicData[] = [ { key: 3, name: '128 GB SSD', - category: 'Hardrive', + category: 'Harddrive', price: 49.99, description: 'Reliable and fast data storage', }, { key: 4, name: '128 GB SSD', - category: 'Hardrive', + category: 'Harddrive', price: 49.99, description: 'Reliable and fast data storage', }, @@ -149,14 +149,14 @@ const basicData: BasicData[] = [ { key: 7, name: '256 GB SSD', - category: 'Hardrive', + category: 'Harddrive', price: 175, description: 'Reliable and fast data storage', }, { key: 8, name: '1 TB SSD', - category: 'Hardrive', + category: 'Harddrive', price: 349.99, description: 'Reliable and fast data storage', }, diff --git a/superset-frontend/src/components/Table/TableOverview.stories.tsx b/superset-frontend/src/components/Table/TableOverview.stories.tsx index ad43d12c3..88e411e8c 100644 --- a/superset-frontend/src/components/Table/TableOverview.stories.tsx +++ b/superset-frontend/src/components/Table/TableOverview.stories.tsx @@ -107,7 +107,7 @@ const basicData: = [ { key: 3, name: '128 GB SSD', - category: 'Hardrive', + category: 'Harddrive', price: '49.99' description: 'Reliable and fast data storage', }, diff --git a/superset-frontend/src/components/Table/sorters.test.ts b/superset-frontend/src/components/Table/sorters.test.ts index 80bc0a20c..91c758394 100644 --- a/superset-frontend/src/components/Table/sorters.test.ts +++ b/superset-frontend/src/components/Table/sorters.test.ts @@ -67,7 +67,7 @@ test('alphabeticalSort bad inputs no errors', () => { // incorrect non-object values // @ts-ignore expect(alphabeticalSort('name', 3, [])).toBe(undefined); - // incorrect object values without specificed key + // incorrect object values without specified key expect(alphabeticalSort('name', {}, {})).toBe(undefined); // Object as value for name when it should be a string expect( diff --git a/superset-frontend/src/components/TimezoneSelector/TimezoneSelector.test.tsx b/superset-frontend/src/components/TimezoneSelector/TimezoneSelector.test.tsx index c10ecf2b0..cc422ba85 100644 --- a/superset-frontend/src/components/TimezoneSelector/TimezoneSelector.test.tsx +++ b/superset-frontend/src/components/TimezoneSelector/TimezoneSelector.test.tsx @@ -84,7 +84,7 @@ test('use the default timezone when an invalid timezone is provided', async () = expect(onTimezoneChange).toHaveBeenLastCalledWith('Africa/Abidjan'); }); -test('render timezones in correct oder for standard time', async () => { +test('render timezones in correct order for standard time', async () => { const TimezoneSelector = await loadComponent('2022-01-01'); const onTimezoneChange = jest.fn(); render( diff --git a/superset-frontend/src/components/TooltipParagraph/TooltipParagraph.test.tsx b/superset-frontend/src/components/TooltipParagraph/TooltipParagraph.test.tsx index 07315611f..0ba49a7d6 100644 --- a/superset-frontend/src/components/TooltipParagraph/TooltipParagraph.test.tsx +++ b/superset-frontend/src/components/TooltipParagraph/TooltipParagraph.test.tsx @@ -21,7 +21,7 @@ import userEvent from '@testing-library/user-event'; import TooltipParagraph from '.'; test('starts hidden with default props', () => { - render(This is tootlip description.); + render(This is tooltip description.); expect(screen.queryByRole('tooltip')).not.toBeInTheDocument(); }); diff --git a/superset-frontend/src/components/index.ts b/superset-frontend/src/components/index.ts index f59a8c2f4..16b6138c1 100644 --- a/superset-frontend/src/components/index.ts +++ b/superset-frontend/src/components/index.ts @@ -53,7 +53,7 @@ export { /* * Components that conflict with the ones in src/components. * We should try to avoid using Ant Design directly. The components - * listed bellow may need review. Avoid incrementing this list by using + * listed below may need review. Avoid incrementing this list by using * or extending the components in src/components. */ export { diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx index 68992fa72..24d61b7d1 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx @@ -44,7 +44,7 @@ jest.mock('src/dashboard/actions/dashboardState', () => ({ })); jest.mock('src/components/ResizableSidebar/useStoredSidebarWidth'); -// mock following dependant components to fix the prop warnings +// mock following dependent components to fix the prop warnings jest.mock('src/components/Select/Select', () => () => (
)); @@ -169,7 +169,7 @@ describe('DashboardBuilder', () => { const expectedCount = undoableDashboardLayoutWithTabs.present.TABS_ID.children.length; const tabPanels = within(parentSize).getAllByRole('tabpanel', { - // to include invisiable tab panels + // to include invisible tab panels hidden: true, }); expect(tabPanels.length).toBe(expectedCount); @@ -190,7 +190,7 @@ describe('DashboardBuilder', () => { const expectedCount = undoableDashboardLayoutWithTabs.present.TABS_ID.children.length; const tabPanels = within(parentSize).getAllByRole('tabpanel', { - // to include invisiable tab panels + // to include invisible tab panels hidden: true, }); expect(tabPanels.length).toBe(expectedCount); diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx index f6fe91271..7025b94f1 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx @@ -360,7 +360,7 @@ test('should show all roles', async () => { spyIsFeatureEnabled.mockReturnValue(true); const props = createProps(); - const propsWithDashboardIndo = { ...props, dashboardInfo }; + const propsWithDashboardInfo = { ...props, dashboardInfo }; const open = () => waitFor(() => userEvent.click(getSelect())); const getSelect = () => @@ -372,7 +372,7 @@ test('should show all roles', async () => { const findAllSelectOptions = () => waitFor(() => getElementsByClassName('.ant-select-item-option-content')); - render(, { + render(, { useRedux: true, }); @@ -393,7 +393,7 @@ test('should show active owners with dashboard rbac', async () => { spyIsFeatureEnabled.mockReturnValue(true); const props = createProps(); - const propsWithDashboardIndo = { ...props, dashboardInfo }; + const propsWithDashboardInfo = { ...props, dashboardInfo }; const open = () => waitFor(() => userEvent.click(getSelect())); const getSelect = () => @@ -405,7 +405,7 @@ test('should show active owners with dashboard rbac', async () => { const findAllSelectOptions = () => waitFor(() => getElementsByClassName('.ant-select-item-option-content')); - render(, { + render(, { useRedux: true, }); @@ -426,7 +426,7 @@ test('should show active owners without dashboard rbac', async () => { spyIsFeatureEnabled.mockReturnValue(false); const props = createProps(); - const propsWithDashboardIndo = { ...props, dashboardInfo }; + const propsWithDashboardInfo = { ...props, dashboardInfo }; const open = () => waitFor(() => userEvent.click(getSelect())); const getSelect = () => @@ -438,7 +438,7 @@ test('should show active owners without dashboard rbac', async () => { const findAllSelectOptions = () => waitFor(() => getElementsByClassName('.ant-select-item-option-content')); - render(, { + render(, { useRedux: true, }); diff --git a/superset-frontend/src/dashboard/components/SliceHeader/SliceHeader.test.tsx b/superset-frontend/src/dashboard/components/SliceHeader/SliceHeader.test.tsx index e0569f5aa..f67d3076a 100644 --- a/superset-frontend/src/dashboard/components/SliceHeader/SliceHeader.test.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeader/SliceHeader.test.tsx @@ -356,7 +356,7 @@ test('Should render "annotationsError"', () => { render(, { useRedux: true, useRouter: true }); expect( screen.getByRole('img', { - name: 'One ore more annotation layers failed loading.', + name: 'One or more annotation layers failed loading.', }), ).toBeInTheDocument(); }); @@ -368,7 +368,7 @@ test('Should not render "annotationsError" and "annotationsLoading"', () => { render(, { useRedux: true, useRouter: true }); expect( screen.queryByRole('img', { - name: 'One ore more annotation layers failed loading.', + name: 'One or more annotation layers failed loading.', }), ).not.toBeInTheDocument(); expect( diff --git a/superset-frontend/src/dashboard/components/SliceHeader/index.tsx b/superset-frontend/src/dashboard/components/SliceHeader/index.tsx index 0ffa82756..b02c6eee3 100644 --- a/superset-frontend/src/dashboard/components/SliceHeader/index.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeader/index.tsx @@ -48,7 +48,7 @@ type SliceHeaderProps = SliceHeaderControlsProps & { }; const annotationsLoading = t('Annotation layers are still loading.'); -const annotationsError = t('One ore more annotation layers failed loading.'); +const annotationsError = t('One or more annotation layers failed loading.'); const CrossFilterIcon = styled(Icons.ApartmentOutlined)` ${({ theme }) => ` cursor: default; diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx index 6b79d3182..b9fbd53d0 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx @@ -207,7 +207,7 @@ class Chart extends Component { return true; } - // `cacheBusterProp` is jected by react-hot-loader + // `cacheBusterProp` is injected by react-hot-loader return this.props.cacheBusterProp !== nextProps.cacheBusterProp; } diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx index f7566a7b8..77a423df7 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx @@ -789,7 +789,7 @@ const FiltersConfigForm = ( filterValues={(column: Column) => !!column.is_dttm} datasetId={datasetId} onChange={column => { - // We need reset default value when when column changed + // We need reset default value when column changed setNativeFilterFieldValues(form, filterId, { granularity_sqla: column, }); diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.test.tsx index 368df7088..93d31990a 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.test.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.test.tsx @@ -166,7 +166,7 @@ test('Clicking on checkbox', () => { expect(props.forceUpdate).toBeCalled(); }); -test('Clicking on checkbox when resetConfig:flase', () => { +test('Clicking on checkbox when resetConfig:false', () => { const props = createProps(); (getControlItems as jest.Mock).mockReturnValue([ { name: 'name_1', config: { renderTrigger: true, resetConfig: false } }, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx index 4c61aa0c3..dbb1c2fc4 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx @@ -379,7 +379,7 @@ test('deletes a filter', async () => { onSave, }); const removeButtons = screen.getAllByRole('img', { name: 'trash' }); - // remove NATIVE_FILTER-3 which isn't a dependancy of any other filter + // remove NATIVE_FILTER-3 which isn't a dependency of any other filter userEvent.click(removeButtons[2]); userEvent.click(screen.getByRole('button', { name: SAVE_REGEX })); await waitFor(() => @@ -420,7 +420,7 @@ test('deletes a filter including dependencies', async () => { onSave, }); const removeButtons = screen.getAllByRole('img', { name: 'trash' }); - // remove NATIVE_FILTER-2 which is a dependancy of NATIVE_FILTER-1 + // remove NATIVE_FILTER-2 which is a dependency of NATIVE_FILTER-1 userEvent.click(removeButtons[1]); userEvent.click(screen.getByRole('button', { name: SAVE_REGEX })); await waitFor(() => diff --git a/superset-frontend/src/dashboard/util/getDashboardUrl.test.js b/superset-frontend/src/dashboard/util/getDashboardUrl.test.js index fe6090440..83e622aa7 100644 --- a/superset-frontend/src/dashboard/util/getDashboardUrl.test.js +++ b/superset-frontend/src/dashboard/util/getDashboardUrl.test.js @@ -89,7 +89,7 @@ describe('getChartIdsFromLayout', () => { windowSpy.mockImplementation(() => ({ location: { origin: 'https://localhost', - search: '?unkown_param=value', + search: '?unknown_param=value', }, })); const urlWithStandalone = getDashboardUrl({ @@ -97,7 +97,7 @@ describe('getChartIdsFromLayout', () => { standalone: DashboardStandaloneMode.HideNav, }); expect(urlWithStandalone).toBe( - `path?unkown_param=value&standalone=${DashboardStandaloneMode.HideNav}`, + `path?unknown_param=value&standalone=${DashboardStandaloneMode.HideNav}`, ); windowSpy.mockRestore(); }); diff --git a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx index 7b3961853..90f8b5d99 100644 --- a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx +++ b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx @@ -136,7 +136,7 @@ const SAVE_AS_DATASET = 'save_as_dataset'; // a tooltip for user can see the full name by hovering over the visually truncated string in UI const VISIBLE_TITLE_LENGTH = 25; -// Assign icon for each DatasourceType. If no icon assingment is found in the lookup, no icon will render +// Assign icon for each DatasourceType. If no icon assignment is found in the lookup, no icon will render export const datasourceIconLookup = { [DatasourceType.Query]: ( @@ -188,7 +188,7 @@ class DatasourceControl extends PureComponent { const { columns } = datasource; // the current granularity_sqla might not be a temporal column anymore const timeCol = this.props.form_data?.granularity_sqla; - const isGranularitySqalTemporal = columns.find( + const isGranularitySqlaTemporal = columns.find( ({ column_name }) => column_name === timeCol, )?.is_dttm; // the current main_dttm_col might not be a temporal column anymore @@ -198,7 +198,7 @@ class DatasourceControl extends PureComponent { // if the current granularity_sqla is empty or it is not a temporal column anymore // let's update the control value - if (datasource.type === 'table' && !isGranularitySqalTemporal) { + if (datasource.type === 'table' && !isGranularitySqlaTemporal) { const temporalColumn = isDefaultTemporal ? defaultTemporalColumn : temporalColumns?.[0]; diff --git a/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx b/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx index c18873460..228f6ac13 100644 --- a/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx +++ b/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx @@ -156,7 +156,7 @@ describe('controlUtils', () => { expect(control?.value).toBeNull(); }); - it('returns null for non-existent field', () => { + it('returns null for nonexistent field', () => { const control = getControlState('NON_EXISTENT', 'table', state); expect(control).toBeNull(); }); diff --git a/superset-frontend/src/explore/controlUtils/standardizedFormData.ts b/superset-frontend/src/explore/controlUtils/standardizedFormData.ts index 082ff6c91..b8d7ad7c7 100644 --- a/superset-frontend/src/explore/controlUtils/standardizedFormData.ts +++ b/superset-frontend/src/explore/controlUtils/standardizedFormData.ts @@ -193,7 +193,7 @@ export class StandardizedFormData { controlsState: ControlStateMapping; } { /* - * Transfrom form_data between different viz. Return new form_data and controlsState. + * Transform form_data between different viz. Return new form_data and controlsState. * 1. get memorized form_data by viz type or get previous form_data * 2. collect public control values * 3. generate initial targetControlsState diff --git a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/types.ts b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/types.ts index c2330f3f1..264662047 100644 --- a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/types.ts +++ b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/types.ts @@ -63,8 +63,8 @@ export interface IDatabaseTable { } /** - * Checks if a given item matches the isIDatabsetTable interface - * @param item Object to check if it matches the isIDatabsetTable interface + * Checks if a given item matches the isIDatabaseTable interface + * @param item Object to check if it matches the isIDatabaseTable interface * @returns boolean true if matches interface */ export const isIDatabaseTable = (item: any): boolean => { diff --git a/superset-frontend/src/features/datasets/AddDataset/LeftPanel/LeftPanel.test.tsx b/superset-frontend/src/features/datasets/AddDataset/LeftPanel/LeftPanel.test.tsx index e66c9785d..4f8055cff 100644 --- a/superset-frontend/src/features/datasets/AddDataset/LeftPanel/LeftPanel.test.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/LeftPanel/LeftPanel.test.tsx @@ -271,7 +271,7 @@ test('searches for a table name', async () => { }); }); -test('renders a warning icon when a table name has a pre-existing dataset', async () => { +test('renders a warning icon when a table name has a preexisting dataset', async () => { render( { ); useEffect(() => { - // Todo: this useEffect should be used to call all count methods conncurently + // Todo: this useEffect should be used to call all count methods concurrently // when we populate data for the new tabs. For right separating out this // api call for building the usage page. if (id) { diff --git a/superset-frontend/src/features/home/RightMenu.tsx b/superset-frontend/src/features/home/RightMenu.tsx index 99a139836..c07b6b33a 100644 --- a/superset-frontend/src/features/home/RightMenu.tsx +++ b/superset-frontend/src/features/home/RightMenu.tsx @@ -247,7 +247,7 @@ const RightMenu = ({ SupersetClient.get({ endpoint: `/api/v1/database/?q=${rison.encode(payload)}`, }).then(({ json }: Record) => { - // There might be some existings Gsheets and Clickhouse DBs + // There might be some existing Gsheets and Clickhouse DBs // with allow_file_upload set as True which is not possible from now on const allowedDatabasesWithFileUpload = json?.result?.filter( diff --git a/superset-frontend/src/features/queries/QueryPreviewModal.test.tsx b/superset-frontend/src/features/queries/QueryPreviewModal.test.tsx index 336b9dbb3..54cfd45ae 100644 --- a/superset-frontend/src/features/queries/QueryPreviewModal.test.tsx +++ b/superset-frontend/src/features/queries/QueryPreviewModal.test.tsx @@ -82,7 +82,7 @@ describe('QueryPreviewModal', () => { await waitForComponentToPaint(wrapper); }); - it('renders a SynxHighlighter', () => { + it('renders a SyntaxHighlighter', () => { expect(wrapper.find(SyntaxHighlighter)).toExist(); }); diff --git a/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx b/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx index 31ef7993a..2b3ef730c 100644 --- a/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx +++ b/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx @@ -119,7 +119,7 @@ export interface RowLevelSecurityModalProps { show: boolean; } -const DEAFULT_RULE = { +const DEFAULT_RULE = { name: '', filter_type: FilterType.Regular, tables: [], @@ -133,7 +133,7 @@ function RowLevelSecurityModal(props: RowLevelSecurityModalProps) { const { rule, addDangerToast, addSuccessToast, onHide, show } = props; const [currentRule, setCurrentRule] = useState({ - ...DEAFULT_RULE, + ...DEFAULT_RULE, }); const [disableSave, setDisableSave] = useState(true); @@ -204,7 +204,7 @@ function RowLevelSecurityModal(props: RowLevelSecurityModalProps) { // initialize useEffect(() => { if (!isEditMode) { - setCurrentRule({ ...DEAFULT_RULE }); + setCurrentRule({ ...DEFAULT_RULE }); } else if (rule?.id !== null && !loading && !fetchError) { fetchResource(rule.id as number); } @@ -249,7 +249,7 @@ function RowLevelSecurityModal(props: RowLevelSecurityModalProps) { const hide = () => { clearError(); - setCurrentRule({ ...DEAFULT_RULE }); + setCurrentRule({ ...DEFAULT_RULE }); onHide(); }; diff --git a/superset-frontend/src/hooks/apiResources/apiResources.ts b/superset-frontend/src/hooks/apiResources/apiResources.ts index 722998c32..04166db1d 100644 --- a/superset-frontend/src/hooks/apiResources/apiResources.ts +++ b/superset-frontend/src/hooks/apiResources/apiResources.ts @@ -33,8 +33,8 @@ export enum ResourceStatus { export type Resource = LoadingState | CompleteState | ErrorState; // Trying out something a little different: a separate type per status. -// This should let Typescript know whether a Resource has a result or error. -// It's possible that I'm expecting too much from Typescript here. +// This should let TypeScript know whether a Resource has a result or error. +// It's possible that I'm expecting too much from TypeScript here. // If this ends up causing problems, we can change the type to: // // export type Resource = { diff --git a/superset-frontend/src/hooks/apiResources/tables.ts b/superset-frontend/src/hooks/apiResources/tables.ts index 86b080745..e32113bab 100644 --- a/superset-frontend/src/hooks/apiResources/tables.ts +++ b/superset-frontend/src/hooks/apiResources/tables.ts @@ -85,7 +85,7 @@ export type TableMetaData = { columns: Column[]; }; -type TableMetadataReponse = { +type TableMetadataResponse = { json: TableMetaData; response: Response; }; @@ -130,7 +130,7 @@ const tableApi = api.injectEndpoints({ catalog, schema, })}`, - transformResponse: ({ json }: TableMetadataReponse) => json, + transformResponse: ({ json }: TableMetadataResponse) => json, }), }), tableExtendedMetadata: builder.query< diff --git a/superset-frontend/src/pages/DatabaseList/index.tsx b/superset-frontend/src/pages/DatabaseList/index.tsx index 1d29cbc56..345d589a1 100644 --- a/superset-frontend/src/pages/DatabaseList/index.tsx +++ b/superset-frontend/src/pages/DatabaseList/index.tsx @@ -281,7 +281,7 @@ function DatabaseList({ SupersetClient.get({ endpoint: `/api/v1/database/?q=${rison.encode(payload)}`, }).then(({ json }: Record) => { - // There might be some existings Gsheets and Clickhouse DBs + // There might be some existing Gsheets and Clickhouse DBs // with allow_file_upload set as True which is not possible from now on const allowedDatabasesWithFileUpload = json?.result?.filter( diff --git a/superset-frontend/src/pages/DatasetList/DatasetList.test.tsx b/superset-frontend/src/pages/DatasetList/DatasetList.test.tsx index 255540eb9..29b163341 100644 --- a/superset-frontend/src/pages/DatasetList/DatasetList.test.tsx +++ b/superset-frontend/src/pages/DatasetList/DatasetList.test.tsx @@ -196,7 +196,7 @@ describe('DatasetList', () => { ).toBeFalsy(); act(() => { wrapper - .find('#duplicate-action-tooltop') + .find('#duplicate-action-tooltip') .at(0) .find('.action-button') .props() @@ -212,7 +212,7 @@ describe('DatasetList', () => { await waitForComponentToPaint(wrapper); await act(async () => { wrapper - .find('#duplicate-action-tooltop') + .find('#duplicate-action-tooltip') .at(0) .find('.action-button') .props() diff --git a/superset-frontend/src/pages/DatasetList/index.tsx b/superset-frontend/src/pages/DatasetList/index.tsx index 21ea17b76..50f47b2c4 100644 --- a/superset-frontend/src/pages/DatasetList/index.tsx +++ b/superset-frontend/src/pages/DatasetList/index.tsx @@ -478,7 +478,7 @@ const DatasetList: FunctionComponent = ({ )} {canDuplicate && original.kind === 'virtual' && ( diff --git a/superset-frontend/src/pages/RowLevelSecurityList/RowLevelSecurityList.test.tsx b/superset-frontend/src/pages/RowLevelSecurityList/RowLevelSecurityList.test.tsx index 72e1a06fb..0cbf34949 100644 --- a/superset-frontend/src/pages/RowLevelSecurityList/RowLevelSecurityList.test.tsx +++ b/superset-frontend/src/pages/RowLevelSecurityList/RowLevelSecurityList.test.tsx @@ -197,14 +197,14 @@ describe('RuleList RTL', () => { expect(table).toBeInTheDocument(); const nameColumn = await within(table).findByText('Name'); - const fitlerTypeColumn = await within(table).findByText('Filter Type'); + const filterTypeColumn = await within(table).findByText('Filter Type'); const groupKeyColumn = await within(table).findByText('Group Key'); const clauseColumn = await within(table).findByText('Clause'); const modifiedColumn = await within(table).findByText('Last modified'); const actionsColumn = await within(table).findByText('Actions'); expect(nameColumn).toBeInTheDocument(); - expect(fitlerTypeColumn).toBeInTheDocument(); + expect(filterTypeColumn).toBeInTheDocument(); expect(groupKeyColumn).toBeInTheDocument(); expect(clauseColumn).toBeInTheDocument(); expect(modifiedColumn).toBeInTheDocument(); diff --git a/superset-frontend/src/setup/setupApp.ts b/superset-frontend/src/setup/setupApp.ts index 0f31024cd..44826829a 100644 --- a/superset-frontend/src/setup/setupApp.ts +++ b/superset-frontend/src/setup/setupApp.ts @@ -95,6 +95,6 @@ export default function setupApp() { window.jQuery = $; require('bootstrap'); - // setup appwide custom error messages + // set up app wide custom error messages setupErrorMessages(); } diff --git a/superset-frontend/src/views/routes.test.tsx b/superset-frontend/src/views/routes.test.tsx index b808ad0e7..b4c29e08b 100644 --- a/superset-frontend/src/views/routes.test.tsx +++ b/superset-frontend/src/views/routes.test.tsx @@ -28,6 +28,6 @@ describe('isFrontendRoute', () => { }); it('returns false if a route does not match', () => { - expect(isFrontendRoute('/non-existent/path/')).toBe(false); + expect(isFrontendRoute('/nonexistent/path/')).toBe(false); }); }); diff --git a/superset-frontend/src/views/store.ts b/superset-frontend/src/views/store.ts index ebed3f67f..9fcdf53e9 100644 --- a/superset-frontend/src/views/store.ts +++ b/superset-frontend/src/views/store.ts @@ -141,7 +141,7 @@ const reducers = { explore, }; -/* In some cases the jinja template injects two seperate React apps into basic.html +/* In some cases the jinja template injects two separate React apps into basic.html * One for the top navigation Menu and one for the application below the Menu * The first app to connect to the Redux debugger wins which is the menu blocking * the application from being able to connect to the redux debugger. diff --git a/superset-frontend/tools/eslint-plugin-translation-vars/index.js b/superset-frontend/tools/eslint-plugin-translation-vars/index.js index 69493f3b9..9f3a54c42 100644 --- a/superset-frontend/tools/eslint-plugin-translation-vars/index.js +++ b/superset-frontend/tools/eslint-plugin-translation-vars/index.js @@ -41,7 +41,7 @@ module.exports = { context.report({ node, message: - "Don't use variables in translation string templates. Flask-babel is a static translation translation service, so it can’t handle strings that include variables", + "Don't use variables in translation string templates. Flask-babel is a static translation service, so it can’t handle strings that include variables", }); } } diff --git a/superset/translations/en/LC_MESSAGES/messages.po b/superset/translations/en/LC_MESSAGES/messages.po index 6e2211a7f..8906babe4 100644 --- a/superset/translations/en/LC_MESSAGES/messages.po +++ b/superset/translations/en/LC_MESSAGES/messages.po @@ -5499,7 +5499,7 @@ msgstr "" msgid "Intervals" msgstr "" -msgid "Intesity" +msgid "Intensity" msgstr "" msgid "" @@ -6977,7 +6977,7 @@ msgstr "" msgid "One or more parameters specified in the query are missing." msgstr "" -msgid "One ore more annotation layers failed loading." +msgid "One or more annotation layers failed loading." msgstr "" msgid "Only SELECT statements are allowed against this database." @@ -12168,7 +12168,7 @@ msgstr "" msgid "" "Whether to show extra controls or not. Extra controls include things like" -" making mulitBar charts stacked or side by side." +" making multiBar charts stacked or side by side." msgstr "" msgid "Whether to show minor ticks on the axis" diff --git a/superset/translations/messages.pot b/superset/translations/messages.pot index c36c1ad9c..4ee458010 100644 --- a/superset/translations/messages.pot +++ b/superset/translations/messages.pot @@ -5498,7 +5498,7 @@ msgstr "" msgid "Intervals" msgstr "" -msgid "Intesity" +msgid "Intensity" msgstr "" msgid "" @@ -6974,7 +6974,7 @@ msgstr "" msgid "One or more parameters specified in the query are missing." msgstr "" -msgid "One ore more annotation layers failed loading." +msgid "One or more annotation layers failed loading." msgstr "" msgid "Only SELECT statements are allowed against this database." @@ -12155,7 +12155,7 @@ msgstr "" msgid "" "Whether to show extra controls or not. Extra controls include things like" -" making mulitBar charts stacked or side by side." +" making multiBar charts stacked or side by side." msgstr "" msgid "Whether to show minor ticks on the axis"