-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SIP-9] Introduce TypeScript #6120
Conversation
f1bed58
to
1cebfc9
Compare
superset/assets/webpack.config.js
Outdated
@@ -102,8 +109,12 @@ const config = { | |||
}, | |||
}, | |||
resolve: { | |||
extensions: ['.js', '.jsx'], | |||
alias: { | |||
'@': path.resolve(APP_DIR, './src'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wanted to gauge thoughts on making this more readable like @src
or @root
, etc. instead of just @
.
I don't care that strongly, but do think more readability is generally good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. More readability is always good. :)
Any preference for @src
VS @root
? @williaster @kristw @mistercrunch I think I like them equally. hehe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okey-dokey. Renaming it to @src
shortly. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm, don't have a strong pref / like them equally, too 😃
- Introduce TypeScript and co to both source and tests - Define alias for src directory in both webpack config and jest config so we can avoid using long relative paths like ../../src in both source and tests - Type check feature flags system to prevent typos of flag names - Change the feature flags system and the flags on window instead of populating them through the state tree. When introducing the first SCOPED_FILTER feature flag, it became too difficult to pipe the flags through the state initializers and layers of components and containers (the resulting code is hard to read and has a handful of methods taking an additional feature flag map parameter). Given that feature flags don't change throughout the life time of the app, it is better to leave them on window for easy access than piping them through the global state tree, which is meant to store the state of the app which changes frequently. - Add a barebone filter panel that only shows when the SCOPED_FILTER feature flag is on
- Fixing linting for Javascript files importing Typscript files - Also fix linting for Javascript files that now leverage the webpack alias for the src directory - up Typescript and type def versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks so much for kicking this off! 🙌 💯
1cebfc9
to
ed67d6d
Compare
My pleasure! 🙌 Btw, wound up renaming the webpack alias for the src directory from |
Codecov Report
@@ Coverage Diff @@
## master #6120 +/- ##
=======================================
Coverage 76.91% 76.91%
=======================================
Files 47 47
Lines 9362 9362
=======================================
Hits 7201 7201
Misses 2161 2161 Continue to review full report at Codecov.
|
TypeScript FTW! |
* [SIP-9] Introduce TypeScript - Introduce TypeScript and co to both source and tests - Define alias for src directory in both webpack config and jest config so we can avoid using long relative paths like ../../src in both source and tests - Type check feature flags system to prevent typos of flag names - Change the feature flags system and the flags on window instead of populating them through the state tree. When introducing the first SCOPED_FILTER feature flag, it became too difficult to pipe the flags through the state initializers and layers of components and containers (the resulting code is hard to read and has a handful of methods taking an additional feature flag map parameter). Given that feature flags don't change throughout the life time of the app, it is better to leave them on window for easy access than piping them through the global state tree, which is meant to store the state of the app which changes frequently. - Add a barebone filter panel that only shows when the SCOPED_FILTER feature flag is on * Remove unnecessary dev-dependency on gl * - Adding linting for TypeScript files via tslint. - Fixing linting for Javascript files importing Typscript files - Also fix linting for Javascript files that now leverage the webpack alias for the src directory - up Typescript and type def versions * Rename src directory's webpack alias from @ to src to be more explicit.
@mistercrunch @betodealmeida @williaster @kristw @john-bodley @ttannis