-
Notifications
You must be signed in to change notification settings - Fork 16
FIREFLY-74_upgrade_babel_and_eslint #833
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
Changes from all commits
f8df2e9
2437a45
3c1964d
49b7489
4877497
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
// Custom Jest transform implementation that wraps babel-jest and injects our | ||
// babel presets, so we don't have to use .babelrc. | ||
|
||
/*eslint no-undef: "error"*/ | ||
/*eslint-env node*/ | ||
|
||
module.exports = require('babel-jest').createTransformer({ | ||
presets: ["env", "react", "stage-3"], | ||
presets: [ | ||
'@babel/preset-env', | ||
'@babel/preset-react', | ||
], | ||
plugins:[ | ||
'@babel/plugin-transform-runtime', | ||
'@babel/plugin-proposal-class-properties' | ||
] | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,15 +8,17 @@ | |
"url": "https://github.com/Caltech-IPAC/firefly.git" | ||
}, | ||
"dependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.2", | ||
"@babel/core": "^7.5.0", | ||
"@babel/plugin-proposal-class-properties": "^7.0.0", | ||
"@babel/plugin-transform-runtime": "^7.0.0", | ||
"@babel/polyfill": "^7.0.0", | ||
"@babel/preset-env": "^7.4.4", | ||
"@babel/preset-react": "^7.0.0", | ||
"@babel/preset-stage-3": "^7.0.0", | ||
"@babel/register": "^7.4.4", | ||
"@babel/runtime-corejs2": "^7.0.0", | ||
"babel-loader": "^8.0.0", | ||
"babel-plugin-react-transform": "^2.0.2", | ||
"babel-plugin-transform-runtime": "^6.23.0", | ||
"babel-polyfill": "^6.26.0 ", | ||
"babel-preset-env": "^1.6.1", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-3": "^6.24.1", | ||
"babel-runtime": "^6.26.0", | ||
"classnames": "^2.2.5", | ||
"core-js": "^2.6.4", | ||
"enum": "^2.5", | ||
|
@@ -34,6 +36,7 @@ | |
"react": "^16.8", | ||
"react-addons-update": "^15.6.2", | ||
"react-color": "^2.17.0", | ||
"react-datetime": "^2.16.0", | ||
"react-dnd": "^7.0.2", | ||
"react-dnd-html5-backend": "^7.0.2", | ||
"react-dom": "^16.8.1", | ||
|
@@ -47,18 +50,21 @@ | |
"redux-thunk": "^2.2", | ||
"shallowequal": "^1.0.2", | ||
"transformation-matrix-js": "^2.7.1", | ||
"validator": "^9.4", | ||
"react-datetime": "^2.16.0" | ||
"validator": "^9.4" | ||
}, | ||
"devDependencies": { | ||
"babel-jest": "^23.6.0", | ||
"@babel/core": "^7.5.0", | ||
"@babel/preset-env": "^7.4.4", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-jest": "^23.4.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it has to be declared at 2 places? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I think those are extra ones. I will go ahead and remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed! |
||
"chai": "^3.5.0", | ||
"css-loader": "^0.19.0", | ||
"eslint": "^4.3.0", | ||
"eslint-loader": "^1.9.0", | ||
"eslint": "^5.1.0", | ||
"eslint-loader": "^2.1.0", | ||
"eslint-plugin-jsdoc": "^v3.4.1", | ||
"eslint-plugin-jsx-a11y": "^6.0.3", | ||
"eslint-plugin-react": "^7.6.1", | ||
"eslint-plugin-react-hooks": "^1.6.1", | ||
"file-loader": "^0.9.0", | ||
"ink-docstrap": "^1.2.1", | ||
"jest": "^23.6.0", | ||
|
@@ -73,8 +79,8 @@ | |
"script-loader": "^0.6.1", | ||
"style-loader": "^0.12.3", | ||
"url-loader": "^0.5.7", | ||
"webpack-cli": "^3.2", | ||
"webpack": "^4.29", | ||
"webpack-cli": "^3.2", | ||
"webpack-visualizer-plugin": "^0.1.11" | ||
} | ||
} |
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.
The above plugins are needed now? Do you know what is requiring it?
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.
These plugins are used instead of stage-3 plugin. As far as I understood from:
https://github.com/babel/babel-upgrade
(it is mentioned at the end of that link).
Uh oh!
There was an error while loading. Please reload this page.
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.
I don't think we are using all these. I think we where using stage-3 there before for object expanding (ie.
{...x, {y:1}}
) when it is not part of the standard.Let me look at each of these. I will update this comment.
We want:
@babel/plugin-transform-runtime
We might be using this one, if not, it is useful:
plugin-proposal-class-properties
I don't think we use:
plugin-proposal-json-strings
plugin-syntax-dynamic-import
plugin-syntax-import-meta
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.
Cool, I will take them out.
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.
Take them out and test, make sure nothing breaks.
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.
Fixed, thanks!