Coder Social home page Coder Social logo

lgtm-migrator / garou Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nice-move/garou

0.0 0.0 0.0 1.92 MB

Do thing what heroes didn't do

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

License: MIT License

Shell 0.21% JavaScript 83.08% TypeScript 4.78% CSS 0.79% HTML 5.56% Vue 3.88% Less 0.81% SCSS 0.90%

garou's Introduction

garou

Do thing what heroes didn't do.

npm github node

Features

A code refactoring tool, fixing what eslint/stylelint shouldn't care about, what prettier didn't care about. Offering better code comparing for git diff.

  • Handle tsx/jsx/vue self closing
  • Handle text case from css/scss/less
  • Remove vendor prefix from css/scss/less
  • Handle whitespace, empty line between code
  • Sort css/scss/less properties
  • Sort html/htm attributes
  • Sort jsx/tsx props
  • Sort tsx/ts/mts/cts/jsx/js/mjs/cjs class members
  • Sort tsx/ts/mts/cts/jsx/js/mjs/cjs import / export
  • Sort vue component properties / attributes
  • Dedupe yarn v1 lockfile
  • Remove cnpm cache from yarn v1 lockfile
  • Sort OpenAPI Specification config files (json/yaml/yml)
  • ...other fixing

Installation

npm install garou --save-dev

Usage

npm exec garou .
npm exec garou src
npm exec garou **/foo.js

Run without installation

npx garou .

Configuration

// example: package.json
{
  "garou": {
    "import-groups": [
      // see: https://github.com/lydell/eslint-plugin-simple-import-sort#custom-grouping
      ["react", "react-dom"],
      // shorthand for ["^@external\\/"]
      "^@external\\/",
      "lodash"
    ],
    "ignore": ["fixture/**"]
  }
}

Tips

Using garou with lint-staged

// package.json
{
  "lint-staged": {
    "*": ["garou", "prettier", "eslint --fix"]
  }
}

Using garou might mess up your format, I suggest run garou before run prettier.

Read more at the lint-staged repo.

OpenAPI Specification file sorting

Garou will sort your file when it has openapi properties as 3.x.x.

npm exec garou "**/*.{json,yaml,yml}"

Inspiration

This project is inspired by sortier.

Related

garou's People

Contributors

airkro avatar renovate-bot avatar renovate[bot] avatar

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.