GithubHelp home page GithubHelp logo

rohitdhas / shittier Goto Github PK

View Code? Open in Web Editor NEW
1.0K 4.0 23.0 507 KB

Shittier is an unconventional code formatting tool

Home Page: https://www.npmjs.com/package/shittier

License: MIT License

JavaScript 15.29% TypeScript 84.71%
code-formatter shittier prettier

shittier's Introduction

πŸ’© Shittier

Shittier is a code formatting tool that aims to make your code look as terrible as possible. It is the exact opposite of popular tools like Prettier, which focus on improving code formatting and readability. Shittier embraces chaos, messiness, and confusion, making your code look shittier than ever before.

With Shittier, you can expect the following:

  • Random indentation for a chaotic code structure.
  • Mixed case madness that breaks consistency.
  • Spacing nightmares with added or removed spaces, tabs, and line breaks.

Shittier Preview

πŸ“₯️ Installation

To install Shittier, follow these steps:

  1. Make sure you have Node.js installed on your machine.
  2. Open a terminal and run the following command:
    npm install -g shittier
    

πŸš€ Usage

After installing Shittier, you can run it on your codebase by executing the following command in your project's root directory:

shittier [options] [directory/file]

Options

  • -h, --help: Displays help information about Shittier and its available options.
  • -v, --version: Shows the installed version of Shittier.
  • -f, --force: Forces Shittier to overwrite files if they already exists.

Examples

  • Format a single file:

    shittier myfile.js
    
  • Format a single file and save the modified file with a different name or path:

    shittier myfile.js modified/myfile.js
    

    Use --force flag to force overwrite if output file already exists

⚠️ Disclaimer

Shittier is a purely satirical project created for fun and entertainment purposes. It is not intended for use in any serious development environment. Using Shittier on production code may result in confusion, frustration, and a lot of head-scratching. Use it responsibly and at your own risk.

πŸ“œ License

Shittier is released under the MIT License. See the LICENSE file for more details.


Enjoy the chaos and let Shittier transform your perfectly fine code into an unrecognizable mess! Remember, sometimes it's good to embrace the dark side of code formatting. Happy shittifying!

shittier's People

Contributors

rohitdhas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

shittier's Issues

Please tag/create a release on GitHub

Hey there πŸ‘‹

I love silly projects like this, so thanks for creating this πŸŽ‰ πŸ‘

I have packaged it for NixOS, so that it will be possible to install it using the Nix package manager.
Since you haven't yet created a release on GitHub yet, I had to package it as unstable. Seeing that it got released on npm as version 0.1.1, could you also create a release on GitHub?

For more information on how to create releases on GitHub, you can refer to the official GitHub documentation.

If that is too much work, could you just tag releases that you push to npm with git tag and then push them to the repository with git push --tags πŸ™

Thanks in advance!

What about making code to prose?

Indentation, a bunch of new lines and even syntax highlighting is so out of style for modern software development.

Instead, I suggest a formatter that would convert indented code into prose: without newlines, separated only by semicolons, so it is readable as normal human text.

We've been using this notation for centuries! Imagine what how a much space would be needed if you wanted to indented a novel, for example War and Peace?

Not working

I try to run this on my code and nothing changes please help

Pre-commit hook

Howdy,

I am planning to use this in my super important business job, and would like it as a pre-commit hook.

Sadly I have no dev experience, but I'm more than happy to write the docs for this!

[Feature Request] Duplicate function code

When there is a function call, replace it with the real function code. Moreover, remove the function code if there is no place to use it. Everything in a single main function should be pretty impressive

Add options to rename variables, and insert line breaks

Please add options to rename variables. Either :

  • GUID,
  • minified,
  • keep the actual variable names, but suppress or swap random letters in them
  • let a LLM decide better variable names (I suggest precising a random topic as for the subject of the app, like car-making, food industry or plant-cross-breeding)
  • a mix of all the above

Please add an option to insert random copious amounts of line breaks.

hoisting causing function case modification to fail

In JavaScript, functions are hoisted, which means that even if a function is declared at the bottom of the file, it can still be accessed at the top. This hoisting behavior is causing an issue in Shittier, specifically when we search for function declarations to modify their case and make corresponding modifications wherever the function is called throughout the code.

The problem arises due to hoisting, as users can call the function even before it's defined explicitly in the code. As a result, the case modification process fails, and it breaks the code execution.

Expected Behavior:
The case modification process in Shittier should handle hoisting correctly, ensuring that the function's case is modified consistently throughout the codebase, regardless of whether the function is called before or after its declaration.

Steps to Reproduce:

  1. Declare a function at the bottom of the file in Shittier.
  2. Call the function before its declaration in the code.

Observed Behavior:
The function's case is not modified when it is called before its explicit declaration, leading to unexpected behavior and code execution errors.
image

Expected Behavior:
The function's case should be modified consistently throughout the codebase, regardless of the function's hoisting behavior.

Can you rewrite it in Python?

I'm interested in contributing to creating shitty code and think Python would be a better language due to the multitude of natural language processing libraries out there in Python such as NLTK. This should make it easier to support multitudes of programming languages.

Add testimonials section to `README`

"This plugin truly made my codebase shittier" - Developer at X

"My code is a pile of shit now! So effective" - Developer at Y

"I can't believe how shitty shittier is" - Developer at Z

I believe testimonials would make the plugin much more credible.

Line spacing

The worst code has bizarre line-space grouping so you think you see blocks of logic where there are none. The best place for this is anything in a book or sample, where suckers who are learning don’t know any better.

It should also rename things, but subtly. So, remove any verbs so the caller can't tell if the call might mutate state or have side-effects.

Also, where you have e.g. a count of cats, call that variable just cats so it appears as if it could reasonably contain the actual iterable of cats, but also contain the count of cats such that you're bound to lose in an argument with the author.

This could be part of a new tool call refuctor.

Readability

Readability of a code remains intact. Better to randomly place the comment around and convert some condition into ternary, rename some variables into random shit and any idea you came up with.

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.