jscodeshift Questions
1
I'm trying to run the top-level-imports codemod found here: https://github.com/mui-org/material-ui/blob/master/packages/material-ui-codemod/README.md#top-level-imports.
So I ran npm install -D @ma...
Characharabanc asked 8/3, 2020 at 6:10
0
I've seen some developers wondering how to run jscodeshift without CLI, there are some issues but they're very simple, so If someone wants to effectively run it with options, here's an example.
con...
Incudes asked 10/11, 2020 at 13:49
2
Solved
My use case: I'm building a Yeoman generator, that modifies TypeScript files; in ways similar to:
Add import statements
Import components into an AngularJS module
Yeoman recommends using an AST...
Barrows asked 2/8, 2017 at 17:2
2
This experimental syntax requires enabling the parser plugin: 'exportDefaultFrom'
I am getting the above error while trying to move the entire application from react v15.6to v16.2, by using the mi...
Seraphine asked 17/8, 2018 at 4:44
2
Solved
https://astexplorer.net/#/gist/70df1bc56b9ee73d19fc949d2ef829ed/7e14217fd8510f0bf83f3372bf08454b7617bce1
I've found now I'm trying to replace an expression and I don't care whats in it.
in this e...
Phares asked 23/4, 2018 at 21:37
2
Solved
I am creating a transform that will replace all instances of:
templateUrl: 'some/url/to/some.html'
with
template: require('some/url/to/some.html')
I am doing this because I am changing the wa...
Percept asked 21/4, 2017 at 15:4
2
Solved
https://astexplorer.net/#/gist/ad90272020dd0bfb15619d93cca81b66/28d3cf7178271f4f99b10bc9352daa873c2f2b20
// file
var a = "a" // what if this is import statement?
// jscodeshift
export default (fi...
Siskin asked 3/9, 2017 at 7:27
1
Using jscodeshift, how can I transform
// Some code ...
const someObj = {
x: {
foo: 3
}
};
// Some more code ...
to
// Some code ...
const someObj = {
x: {
foo: 4,
bar: '5'
}
};
// S...
Heller asked 11/4, 2017 at 8:21
1
© 2022 - 2024 — McMap. All rights reserved.