antfu / eslint-plugin-command Goto Github PK
View Code? Open in Web Editor NEWComment-as-command for one-off codemod with ESLint.
Home Page: https://eslint-plugin-command.antfu.me/
License: MIT License
Comment-as-command for one-off codemod with ESLint.
Home Page: https://eslint-plugin-command.antfu.me/
License: MIT License
Hey there, I started using eslint-plugin-command
and it's a pure joy so far, thanks @antfu!
I'd like a new command to refactor sequential promises to a single Promise.all
call to run things in parallel.
Source:
/// to-promise-all
const a = await getA();
const b = await getB();
const c = await getC();
Result:
const [a, b, c] = await Promise.all([getA(), getB(), getC()]);
There might already be an eslint rule that finds and fixes potential performance issues, but I haven't found it yet
Maybe the reverse operation /// to-seq-await
would make sense if one wants to introduce dependencies between the promises and avoid refactoring by hand:
/// to-seq-await
const [a, b, c] = await Promise.all([getA(b), getB(c), getC()]);
const c = await getC();
const b = await getB(c);
const a = await getA(a);
I would like to use a command to interconvert between template string
and string
.
Interconversion would be easy, if there are multiple strings in one line, we can specify the number or all to covert.
No response
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.