You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/09/17 13:04:16 UTC
[GitHub] [incubator-superset] kgabryje opened a new pull request #10933: ESLint: Remove ts-ignore comments
kgabryje opened a new pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933
### SUMMARY
I removed some `@ts-ignore` comments and refactored the code accordingly. Some components required a simple dependency bump, installing `@types` package or properly casting the type. In some cases (particularly react-select components) workarounds were necessary - e.g. wrapping an Input component in a div to pass `onPaste` prop.
There are a few ts-ignores left. I decided to leave them for another PR as they might require some bigger refactors.
### TEST PLAN
Run `npm run lint`, verify there are no new linter errors.
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Changes UI
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] kgabryje commented on a change in pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#discussion_r491843418
##########
File path: superset-frontend/src/components/Select/styles.tsx
##########
@@ -245,18 +245,18 @@ const { ClearIndicator, DropdownIndicator, Option } = defaultComponents;
export const DEFAULT_COMPONENTS: SelectComponentsConfig<any> = {
Option: ({ children, innerProps, data, ...props }) => (
- <Option
- {...props}
- data={data}
- innerProps={{
- ...innerProps,
- // `@types/react-select` didn't define `style` for `innerProps`
- // @ts-ignore
- style: data && data.style ? data.style : null,
- }}
- >
- {children}
- </Option>
+ <ClassNames>
Review comment:
Hmm, I think this approach might be a bit cleaner. If we used `styled.div` we'd also need to use `react-select`'s API to get default styles and merge them with our `data.styles`, so in my opinion it's not worth it. WDYT?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas commented on a change in pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#discussion_r491164218
##########
File path: superset-frontend/src/components/Select/styles.tsx
##########
@@ -245,18 +245,18 @@ const { ClearIndicator, DropdownIndicator, Option } = defaultComponents;
export const DEFAULT_COMPONENTS: SelectComponentsConfig<any> = {
Option: ({ children, innerProps, data, ...props }) => (
- <Option
- {...props}
- data={data}
- innerProps={{
- ...innerProps,
- // `@types/react-select` didn't define `style` for `innerProps`
- // @ts-ignore
- style: data && data.style ? data.style : null,
- }}
- >
- {children}
- </Option>
+ <ClassNames>
Review comment:
This is cool, and looks like it'll work... but I'm wondering if there's any advantage to this approach vs the `` const Styles = styled.div`...` `` approach
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas commented on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas commented on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-696462865
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas commented on a change in pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#discussion_r491152168
##########
File path: superset-frontend/src/components/Select/SupersetStyledSelect.tsx
##########
@@ -221,8 +221,11 @@ function styled<
// Handle onPaste event
if (onPaste) {
const Input = components.Input || defaultComponents.Input;
- // @ts-ignore (needed for passing `onPaste`)
- components.Input = props => <Input {...props} onPaste={onPaste} />;
+ components.Input = props => (
+ <div onPaste={onPaste}>
+ <Input {...props} />
Review comment:
Not sure if there are tests around this component... have you verified by hand that this still works properly or looked for a test?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] mistercrunch commented on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
mistercrunch commented on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-694648594
There were issues on `master` earlier, please rebase!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas merged pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas merged pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] kgabryje commented on a change in pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#discussion_r491823174
##########
File path: superset-frontend/src/components/Select/SupersetStyledSelect.tsx
##########
@@ -221,8 +221,11 @@ function styled<
// Handle onPaste event
if (onPaste) {
const Input = components.Input || defaultComponents.Input;
- // @ts-ignore (needed for passing `onPaste`)
- components.Input = props => <Input {...props} onPaste={onPaste} />;
+ components.Input = props => (
+ <div onPaste={onPaste}>
+ <Input {...props} />
Review comment:
I have verified it by hand, but we also have unit tests of `OnPasteSelect` component, which uses exactly this component.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas commented on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas commented on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-696463032
Opened a PR to (at least temporarily) revert that commit.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas commented on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas commented on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-696462865
```
2020-09-21T22:49:21.6155663Z > eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx . && npm run type
2020-09-21T22:49:21.6156105Z
2020-09-21T22:50:19.3926195Z
2020-09-21T22:50:19.3929001Z /home/runner/work/incubator-superset/incubator-superset/superset-frontend/spec/javascripts/components/TableSelector_spec.jsx
2020-09-21T22:50:19.3930832Z 179:5 warning Skipped test jest/no-disabled-tests
2020-09-21T22:50:19.3932051Z 221:5 warning Skipped test jest/no-disabled-tests
2020-09-21T22:50:19.3932744Z
2020-09-21T22:50:19.3934154Z /home/runner/work/incubator-superset/incubator-superset/superset-frontend/spec/javascripts/explore/utils_spec.jsx
2020-09-21T22:50:19.3935922Z 59:5 warning Test has no assertions jest/expect-expect
2020-09-21T22:50:19.3939217Z 68:5 warning Test has no assertions jest/expect-expect
2020-09-21T22:50:19.3940312Z 80:5 warning Test has no assertions jest/expect-expect
2020-09-21T22:50:19.3941191Z 92:5 warning Test has no assertions jest/expect-expect
2020-09-21T22:50:19.3942061Z 104:5 warning Test has no assertions jest/expect-expect
2020-09-21T22:50:19.3942930Z 116:5 warning Test has no assertions jest/expect-expect
2020-09-21T22:50:19.3943799Z 195:5 warning Test has no assertions jest/expect-expect
2020-09-21T22:50:19.3944281Z
2020-09-21T22:50:19.3945490Z /home/runner/work/incubator-superset/incubator-superset/superset-frontend/spec/javascripts/sqllab/TableElement_spec.jsx
2020-09-21T22:50:19.3946832Z 52:3 warning Test has no assertions jest/expect-expect
2020-09-21T22:50:19.3947260Z
2020-09-21T22:50:19.3948419Z /home/runner/work/incubator-superset/incubator-superset/superset-frontend/spec/javascripts/sqllab/actions/sqlLab_spec.js
2020-09-21T22:50:19.3949738Z 110:5 warning Skipped test jest/no-disabled-tests
2020-09-21T22:50:19.3950579Z 178:5 warning Skipped test jest/no-disabled-tests
2020-09-21T22:50:19.3950980Z
2020-09-21T22:50:19.3952147Z /home/runner/work/incubator-superset/incubator-superset/superset-frontend/spec/javascripts/sqllab/reducers/sqlLab_spec.js
2020-09-21T22:50:19.3953464Z 247:5 warning Test has no assertions jest/expect-expect
2020-09-21T22:50:19.3953857Z
2020-09-21T22:50:19.3955078Z /home/runner/work/incubator-superset/incubator-superset/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx
2020-09-21T22:50:19.3956720Z 31:3 warning 'addDangerToast' is defined but never used @typescript-eslint/no-unused-vars
2020-09-21T22:50:19.3958073Z 32:3 warning 'addSuccessToast' is defined but never used @typescript-eslint/no-unused-vars
2020-09-21T22:50:19.3958698Z
2020-09-21T22:50:19.3959246Z ✖ 15 problems (0 errors, 15 warnings)
2020-09-21T22:50:19.3959572Z
2020-09-21T22:50:20.2057788Z
2020-09-21T22:50:20.2059601Z > superset@0.999.0-dev type /home/runner/work/incubator-superset/incubator-superset/superset-frontend
2020-09-21T22:50:20.2060451Z > tsc --noEmit
2020-09-21T22:50:20.2060663Z
2020-09-21T22:50:44.1527383Z [96msrc/components/ListView/Filters.tsx[0m:[93m140[0m:[93m11[0m - [91merror[0m[90m TS2322: [0mType '{ label: string; value: string; }' is not assignable to type 'ValueType<GroupType<GroupType<never>>>'.
2020-09-21T22:50:44.1529417Z Property 'options' is missing in type '{ label: string; value: string; }' but required in type 'GroupType<GroupType<never>>'.
2020-09-21T22:50:44.1530168Z
2020-09-21T22:50:44.1530855Z [7m140[0m value={selectedOption}
2020-09-21T22:50:44.1531543Z [7m [0m [91m ~~~~~[0m
2020-09-21T22:50:44.1531916Z
2020-09-21T22:50:44.1533246Z [96mnode_modules/@types/react-select/src/types.d.ts[0m:[93m11[0m:[93m3[0m
2020-09-21T22:50:44.1534417Z [7m11[0m options: OptionsType<OptionType>;
2020-09-21T22:50:44.1537461Z [7m [0m [96m ~~~~~~~[0m
2020-09-21T22:50:44.1538732Z 'options' is declared here.
2020-09-21T22:50:44.1539523Z [96mnode_modules/@types/react-select/src/Select.d.ts[0m:[93m205[0m:[93m3[0m
2020-09-21T22:50:44.1540192Z [7m205[0m value?: ValueType<OptionType>;
2020-09-21T22:50:44.1540648Z [7m [0m [96m ~~~~~[0m
2020-09-21T22:50:44.1541964Z The expected type comes from property 'value' which is declared here on type 'IntrinsicAttributes & Props<GroupType<GroupType<never>>> & UseAsyncPaginateParams<GroupType<GroupType<never>>, any> & ComponentProps & { ...; } & { ...; }'
2020-09-21T22:50:44.1542896Z
2020-09-21T22:50:44.1544256Z [96msrc/components/ListView/Filters.tsx[0m:[93m141[0m:[93m11[0m - [91merror[0m[90m TS2322: [0mType '(selected: SelectOption | null) => void' is not assignable to type '(value: ValueType<GroupType<GroupType<never>>>, action: ActionMeta<GroupType<GroupType<never>>>) => void'.
2020-09-21T22:50:44.1545588Z Types of parameters 'selected' and 'value' are incompatible.
2020-09-21T22:50:44.1546437Z Type 'ValueType<GroupType<GroupType<never>>>' is not assignable to type 'SelectOption | null'.
2020-09-21T22:50:44.1547291Z Type 'undefined' is not assignable to type 'SelectOption | null'.
2020-09-21T22:50:44.1547649Z
2020-09-21T22:50:44.1548063Z [7m141[0m onChange={onChange}
2020-09-21T22:50:44.1548491Z [7m [0m [91m ~~~~~~~~[0m
2020-09-21T22:50:44.1548650Z
2020-09-21T22:50:44.1549206Z [96mnode_modules/@types/react-select/src/Select.d.ts[0m:[93m169[0m:[93m3[0m
2020-09-21T22:50:44.1550056Z [7m169[0m onChange?: (value: ValueType<OptionType>, action: ActionMeta<OptionType>) => void;
2020-09-21T22:50:44.1550753Z [7m [0m [96m ~~~~~~~~[0m
2020-09-21T22:50:44.1551913Z The expected type comes from property 'onChange' which is declared here on type 'IntrinsicAttributes & Props<GroupType<GroupType<never>>> & UseAsyncPaginateParams<GroupType<GroupType<never>>, any> & ComponentProps & { ...; } & { ...; }'
2020-09-21T22:50:44.1552741Z
2020-09-21T22:50:44.1554123Z [96msrc/components/ListView/Filters.tsx[0m:[93m142[0m:[93m11[0m - [91merror[0m[90m TS2322: [0mType '(inputValue: string, loadedOptions: SelectOption[], { page }: { page: number; }) => Promise<{ options: { label: string; value: string; }[]; hasMore: boolean; additional: { page: number; }; }>' is not assignable to type 'LoadOptions<GroupType<GroupType<never>>, any>'.
2020-09-21T22:50:44.1555467Z Types of parameters 'loadedOptions' and 'options' are incompatible.
2020-09-21T22:50:44.1556260Z Type 'OptionsList<GroupType<GroupType<never>>>' is not assignable to type 'SelectOption[]'.
2020-09-21T22:50:44.1557211Z The type 'OptionsType<GroupType<GroupType<never>>>' is 'readonly' and cannot be assigned to the mutable type 'SelectOption[]'.
2020-09-21T22:50:44.1557691Z
2020-09-21T22:50:44.1558183Z [7m142[0m loadOptions={fetchAndFormatSelects}
2020-09-21T22:50:44.1558686Z [7m [0m [91m ~~~~~~~~~~~[0m
2020-09-21T22:50:44.1558828Z
2020-09-21T22:50:44.1559425Z [96mnode_modules/react-select-async-paginate/ts/types.d.ts[0m:[93m44[0m:[93m5[0m
2020-09-21T22:50:44.1560143Z [7m44[0m loadOptions: LoadOptions<OptionType>;
2020-09-21T22:50:44.1560590Z [7m [0m [96m ~~~~~~~~~~~[0m
2020-09-21T22:50:44.1561767Z The expected type comes from property 'loadOptions' which is declared here on type 'IntrinsicAttributes & Props<GroupType<GroupType<never>>> & UseAsyncPaginateParams<GroupType<GroupType<never>>, any> & ComponentProps & { ...; } & { ...; }'
2020-09-21T22:50:44.1562604Z
2020-09-21T22:50:44.1562739Z
2020-09-21T22:50:44.1562943Z Found 3 errors.
2020-09-21T22:50:44.1563099Z
2020-09-21T22:50:44.2013547Z npm ERR! code ELIFECYCLE
2020-09-21T22:50:44.2014256Z npm ERR! errno 1
2020-09-21T22:50:44.2048042Z npm ERR! superset@0.999.0-dev type: `tsc --noEmit`
2020-09-21T22:50:44.2048746Z npm ERR! Exit status 1
2020-09-21T22:50:44.2049520Z npm ERR!
2020-09-21T22:50:44.2050518Z npm ERR! Failed at the superset@0.999.0-dev type script.
2020-09-21T22:50:44.2051630Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-09-21T22:50:44.2134011Z
2020-09-21T22:50:44.2134573Z npm ERR! A complete log of this run can be found in:
2020-09-21T22:50:44.2135568Z npm ERR! /home/runner/.npm/_logs/2020-09-21T22_50_44_204Z-debug.log
2020-09-21T22:50:44.2196844Z npm ERR! code ELIFECYCLE
2020-09-21T22:50:44.2197185Z npm ERR! errno 1
2020-09-21T22:50:44.2234404Z npm ERR! superset@0.999.0-dev lint: `eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx . && npm run type`
2020-09-21T22:50:44.2235089Z npm ERR! Exit status 1
2020-09-21T22:50:44.2235443Z npm ERR!
2020-09-21T22:50:44.2236440Z npm ERR! Failed at the superset@0.999.0-dev lint script.
2020-09-21T22:50:44.2237161Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-09-21T22:50:44.2381461Z
2020-09-21T22:50:44.2382258Z npm ERR! A complete log of this run can be found in:
2020-09-21T22:50:44.2383564Z npm ERR! /home/runner/.npm/_logs/2020-09-21T22_50_44_223Z-debug.log
2020-09-21T22:50:44.2420245Z ##[error]Process completed with exit code 1.
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas merged pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas merged pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas commented on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas commented on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-696462865
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] kgabryje commented on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
kgabryje commented on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-694217832
@rusackas Can you please take a look?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] kgabryje closed pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
kgabryje closed pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas commented on a change in pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#discussion_r491166235
##########
File path: superset-frontend/src/featureFlags.ts
##########
@@ -38,6 +38,8 @@ export type FeatureFlagMap = {
declare global {
interface Window {
featureFlags: FeatureFlagMap;
+ $: any;
+ jQuery: any;
Review comment:
I'm _not_ worried about, this, and it's not worth spending any real time on, but curious if https://www.npmjs.com/package/@types/jquery might provide easy types for these
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas edited a comment on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas edited a comment on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-696463032
Opened a PR to (at least temporarily) revert that commit. https://github.com/apache/incubator-superset/pull/10987
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] kgabryje commented on a change in pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#discussion_r491823174
##########
File path: superset-frontend/src/components/Select/SupersetStyledSelect.tsx
##########
@@ -221,8 +221,11 @@ function styled<
// Handle onPaste event
if (onPaste) {
const Input = components.Input || defaultComponents.Input;
- // @ts-ignore (needed for passing `onPaste`)
- components.Input = props => <Input {...props} onPaste={onPaste} />;
+ components.Input = props => (
+ <div onPaste={onPaste}>
+ <Input {...props} />
Review comment:
I have verified it by hand, but we also have unit tests of `OnPasteSelect` component, which uses exactly this component.
##########
File path: superset-frontend/src/components/Select/styles.tsx
##########
@@ -245,18 +245,18 @@ const { ClearIndicator, DropdownIndicator, Option } = defaultComponents;
export const DEFAULT_COMPONENTS: SelectComponentsConfig<any> = {
Option: ({ children, innerProps, data, ...props }) => (
- <Option
- {...props}
- data={data}
- innerProps={{
- ...innerProps,
- // `@types/react-select` didn't define `style` for `innerProps`
- // @ts-ignore
- style: data && data.style ? data.style : null,
- }}
- >
- {children}
- </Option>
+ <ClassNames>
Review comment:
Hmm, I think this approach might be a bit cleaner. If we used `styled.div` we'd also need to use `react-select`'s API to get default styles and merge them with our `data.styles`, so in my opinion it's not worth it. WDYT?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-commenter commented on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-694244707
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10933?src=pr&el=h1) Report
> Merging [#10933](https://codecov.io/gh/apache/incubator-superset/pull/10933?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/5623cd64ca49c307df2cb5dc56d8981f7f68f081?el=desc) will **decrease** coverage by `6.03%`.
> The diff coverage is `42.85%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10933/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10933?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #10933 +/- ##
==========================================
- Coverage 65.84% 59.81% -6.04%
==========================================
Files 815 781 -34
Lines 38335 37222 -1113
Branches 3601 3353 -248
==========================================
- Hits 25243 22265 -2978
- Misses 12990 14776 +1786
- Partials 102 181 +79
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `56.78% <42.85%> (+0.06%)` | :arrow_up: |
| #javascript | `?` | |
| #python | `61.46% <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10933?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...et-frontend/src/SqlLab/components/LimitControl.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10933/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL0xpbWl0Q29udHJvbC50c3g=) | `65.78% <0.00%> (-22.85%)` | :arrow_down: |
| [...src/components/FilterableTable/FilterableTable.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10933/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRmlsdGVyYWJsZVRhYmxlL0ZpbHRlcmFibGVUYWJsZS50c3g=) | `2.61% <0.00%> (-83.03%)` | :arrow_down: |
| [superset-frontend/src/components/Link.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10933/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGluay50c3g=) | `7.69% <ø> (-79.81%)` | :arrow_down: |
| [...erset-frontend/src/components/ListView/Filters.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10933/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvRmlsdGVycy50c3g=) | `84.74% <ø> (-4.81%)` | :arrow_down: |
| [...ponents/Select/WindowedSelect/WindowedMenuList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10933/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L1dpbmRvd2VkU2VsZWN0L1dpbmRvd2VkTWVudUxpc3QudHN4) | `96.29% <ø> (-0.26%)` | :arrow_down: |
| [...perset-frontend/src/datasource/DatasourceModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10933/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFzb3VyY2UvRGF0YXNvdXJjZU1vZGFsLnRzeA==) | `81.08% <ø> (-14.67%)` | :arrow_down: |
| [...rontend/src/explore/components/PropertiesModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10933/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9Qcm9wZXJ0aWVzTW9kYWwudHN4) | `45.76% <0.00%> (-16.36%)` | :arrow_down: |
| [superset-frontend/src/featureFlags.ts](https://codecov.io/gh/apache/incubator-superset/pull/10933/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZlYXR1cmVGbGFncy50cw==) | `100.00% <ø> (ø)` | |
| [superset-frontend/src/setup/setupApp.ts](https://codecov.io/gh/apache/incubator-superset/pull/10933/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQXBwLnRz) | `28.57% <ø> (+3.57%)` | :arrow_up: |
| [...perset-frontend/src/views/CRUD/welcome/Welcome.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10933/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9XZWxjb21lLnRzeA==) | `0.00% <0.00%> (-85.00%)` | :arrow_down: |
| ... and [265 more](https://codecov.io/gh/apache/incubator-superset/pull/10933/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10933?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10933?src=pr&el=footer). Last update [5623cd6...dc0c007](https://codecov.io/gh/apache/incubator-superset/pull/10933?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas edited a comment on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas edited a comment on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-696463032
Opened a PR to (at least temporarily) revert that commit. https://github.com/apache/incubator-superset/pull/10987
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas merged pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas merged pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] nytai commented on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
nytai commented on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-696460893
@kgabryje @rusackas This change is causing failures on master https://github.com/apache/incubator-superset/runs/1146648924
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] nytai commented on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
nytai commented on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-696460893
@kgabryje @rusackas This change is causing failures on master https://github.com/apache/incubator-superset/runs/1146648924
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] kgabryje closed pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
kgabryje closed pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] nytai commented on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
nytai commented on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-696460893
@kgabryje @rusackas This change is causing failures on master https://github.com/apache/incubator-superset/runs/1146648924
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] rusackas edited a comment on pull request #10933: ESLint: Remove ts-ignore comments
Posted by GitBox <gi...@apache.org>.
rusackas edited a comment on pull request #10933:
URL: https://github.com/apache/incubator-superset/pull/10933#issuecomment-696463032
Opened a PR to (at least temporarily) revert that commit. https://github.com/apache/incubator-superset/pull/10987
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org