dev

/lint.js (0a010ee29d2ffc0de9993b81a26c53f7fa8685c1) (335 bytes) (mode 100755) (type blob)

#!/usr/bin/env node
const { exec } = require("shelljs"),
  { print } = require("./base"),
  files = exec(`git diff --staged --name-only | grep \.js$`).stdout.split("\n");

print(__filename);

if (files.length > 1) {
  const params = files.join(" "),
    command = `npx prettier --write ${params}`;
  print(command);
  exec(command);
}


Mode Type Size Ref File
100644 blob 14 c2658d7d1b31848c3b71960543cb0368e56cd4c7 .gitignore
100644 blob 57 53c96310c475eeabc923002d22b12481321a1a3c .huskyrc
100644 blob 508 ed258b30d27cb0ff81f4d1b2f1f555ea79ac55be base.js
100755 blob 335 0a010ee29d2ffc0de9993b81a26c53f7fa8685c1 lint.js
100644 blob 19146 6ab24c86ec741ab08a5ad069ecb912ef6430608b package-lock.json
100644 blob 443 d0443e7a229c67c59abbe01767eaca145fd95b7c package.json
100755 blob 570 c345066010605c940d4c7dcf5c522b7daf07b1d8 pre-commit.js
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mucbuc/configs

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mucbuc/configs

Clone this repository using git:
git clone git://git.rocketgit.com/user/mucbuc/configs

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main