Coder Social home page Coder Social logo

azhiv / abracadabra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nicoespeon/abracadabra

0.0 0.0 0.0 58.26 MB

Automated refactorings for VS Code (JS & TS) ✨ It's magic ✨

Home Page: https://marketplace.visualstudio.com/items?itemName=nicoespeon.abracadabra

License: MIT License

Shell 0.01% JavaScript 2.34% TypeScript 95.74% Vue 1.34% EJS 0.57%

abracadabra's Introduction

🧙‍ Abracadabra

Refactoring (noun): a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior.

"Refactoring: Improving the Design of Existing Code" by Martin Fowler

All Contributors

Build Status

With Abracadabra, you can quickly and safely refactor existing code in VS Code.

VS Code ships with a few basic refactorings. Abracadabra supercharges your editor with:

  • 🎁 Much, much more refactorings
  • ⚡ Shortcuts to trigger the most useful ones in no-time
  • 💡 Quick Fixes to suggest refactorings when appropriate
  • 🛠 Options to customize the UX to your needs
  • 💬 Refactorings that work with .js, .jsx, .ts, .tsx and .vue files

Refactor Legacy Code in a snap! 👌

Abracadabra in action

Installation

  1. Click on the Extensions icon (usually on the left-hand side of your editor).
  2. Search for "Abracadabra".
  3. Find the extension in the list and click the install button.

List of available refactorings

We have 35+ automated refactorings such as Extract Variable, Extract Type, Flip If/Else, Move to Existing File, etc.

👉 Here's the full catalog of refactorings available

All refactorings are available through the Command Palette.

Some refactorings have default keybindings configured, but you can change that.

All other refactorings are available through VS Code Quick Fixes. You can access them by clicking on the lightbulb that appear next to the code 💡 or use the default shortcut Alt ↵.

Pro Tip: You can also disable the Quick Fixes you never use in VS Code settings 🔥 (look for Abracadabra)

Configuration

Setting Description Default
abracadabra.ignoredFolders Folders where it won't propose refactorings ["node_modules"]
abracadabra.ignoredPatterns Glob patterns where it won't propose refactorings ["dist/*", "build/*"]

For the glob patterns, read glob's documentation to see what you can filter out.

All refactorings that appear in Quick Fix suggestions can also be disabled in your VS Code settings 🔥 (look for Abracadabra)

Release Notes

Have a look at our CHANGELOG to get the details of all changes between versions.

Versioning

We follow SemVer convention for versioning.

That means our releases use the following format:

<major>.<minor>.<patch>
  • Breaking changes bump <major> (and reset <minor> & <patch>)
  • Backward compatible changes bump <minor> (and reset <patch>)
  • Bug fixes bump <patch>

Contributing

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Abracadabra.

To help you get your feet wet and become familiar with our contribution process, we have a list of good first issues that contains things with a relatively limited scope. This is a great place to get started!

Contributors

Thanks goes to these wonderful people (emoji key):


Nicolas Carlo

🤔 💻 📖 👀 💬

Fabien BERNARD

🤔 💻 🎨

David

🐛

GUL

🤔 💻

Alexander Rose

🤔 💻

Tim van Cleef

💻 📖

Tobias Hann

🐛 💻 📖

Jiri Spac

🐛

YuTengjing

🐛 🚇

delaaxe

🤔 💻

James Nail

🐛

Nick Ebbitt

🤔 💻 📖

Oliver Joseph Ash

🤔 🐛 💻 📖

Alberto Xamin

🤔

Sakumatti Luukkonen

🐛 🤔

Sergey Klevakin

🤔 💻

Andrew Janian

🐛

leosdad

🤔 🐛

Iuliu Pop

📖 💻 🐛

Christina Braun

💻

Zak Miller

🐛 💻 🤔

Marcus

🐛

Jonathan Boiser

🐛

Vlad GURDIGA

🐛

Sam Hasler

🤔

Nicolas Favre-Felix

🐛

Wout Mertens

🤔

Luke Harold Miles

🐛 🤔

Ikko Ashimine

📖

Viktor

🤔

sumbatx15

🐛 💻

j4k0xb

🐛

Ian Obermiller

💻 📖 🤔

Emily Marigold Klassen

📖

Vitaly

💻 🚇 🤔

Alan Hussey

🐛

Kevin Coleman

🐛

Roberts Slisans

🐛

Josh

🤔

brunnerh

🤔

Jose Cabrera

🤔

Sebastian Schlatow

🐛

jtwigg

🐛

Andy Bulka

🐛

Andrew Ash

📖

This project follows the all-contributors specification.

Contributions of any kind are welcome!

Alternatives

Building automated refactoring for JavaScript is not easy, and it takes time. Since this is a side-project, it doesn't get as much time as it should to cover everything you need.

If Abracadabra doesn't fit your need for something, here are the other extensions I recommend you check:

  • JS CodeFormer which is built by Chris Stead. Chris built the first JS refactorings extension in VS Code back in the days, so he knows his stuff 👍
  • P42 JavaScript assistant is a recent and impressive tool built by Lars Grammel. I had the opportunity to chat with Lars and we really think alike. The main difference is that Lars is dedicated full-time into building this. It's not open-source, but it may solve the problem you have 😉
  • JavaScript Booster is a popular extension that mimics Webstorm's UX for refactoring—which was a source of inspiration for Abracadabra. Worth having a look.

There are some things I think Abracadabra does better. Other things Abracadabra does worse. The goal with this extension is to provide automated refactorings that are easy to use and VS Code misses. If others are implementing them, I'm more than happy to recommend (and use) their tool!

Have a look, give them a try, use a combination of tools that work best for you.


License

💁 MIT

abracadabra's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.