Comments (6)
Sure. I'm also busy, but I'll leave this open and maybe find time to do it when I need a break from something else!
from alias-hq.
Hey Florian,
Thanks for the kind words!
So I don't know much about CLI / Pipelines, but if I understand you correctly, you'd like to:
- reuse the existing (or have similar) codemod functionality which trawls the
import
statements of a project - to check they always use aliases rather than local paths (or, at least adhere to the logic that the shortest path is used)
- and have this exposed via the command line and pass or fail in a manner than is appropriate for a build pipeline tool
I haven't worked on this for a good few months, but I don't see why that wouldn't be possible.
I don't have much time at the moment, which is a problem (I have an existing PR for renaming aliases which I've not touched in months too!)
I'd be happy for you to submit a PR though. The codemod side of things is surprisingly straightforward; I'd be happy to help you if you needed it.
from alias-hq.
Looking at file which sets up the source transforms:
If newPath
is returned, it means the import / require could be simplified, so I presume at this point you would want to exit with code 1.
One of the surprisingly challenging bits of this project was working out how best to ask questions and how best to preview and report results, so I suspect you might also want to think about that, rather than just exiting?
from alias-hq.
Any more interest in this @FlorianWendelborn or should I close the issue?
from alias-hq.
@davestewart I’d say neither. I don’t have the time right now to develop this, but I still think it’s a useful/vital piece of what this software should be able to do. I’d hope that tagging it as Help Wanted
, one day someone will have time to submit a PR.
from alias-hq.
Closing as stale / not high priority. Feel free to reopen!
from alias-hq.
Related Issues (20)
- Incorrect type for `load` function HOT 6
- Crashes when no baseUrl provided in tsconfig HOT 3
- Changelog is out of date
- Jest plugin does not properly handle modules in parent dir HOT 5
- How to register aliases with ts-node HOT 13
- Paths not working in Vercel Serverless HOT 1
- Upgrade to Jest 28 to support self-referencing packages
- Running node scripts with `alias-hq/init` from subdirectories fails HOT 3
- Deprecated packages in 5.4.0 HOT 2
- Aliases to a node module are mapped as relative to base path HOT 1
- Load should also accept a ready imported TSConfig. HOT 1
- How to set up w/ Docusaurus HOT 2
- Is babel support planned? HOT 6
- Plugin callback function could be improved
- Typescript fails to compile when get method's first parameter is not a string HOT 4
- [Plugin proposal] eslint-import-alias HOT 1
- Change JSON parser to JSON5 HOT 10
- Write JSON 5
- Refactor to TypeScript
- Tsconfig parser does not support Node.js-style resolution of the `extends` field HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alias-hq.