diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 00000000..f5351aeb --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,31 @@ +name: Prettier + +on: + push: + branches: + - main + - dev + tags: + - "**" + pull_request: + branches: + - "**" + +jobs: + prettier: + name: Prettier + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + + - name: Install dependencies + run: npm install + + - name: Run Prettier + run: npm run prettier diff --git a/.gitignore b/.gitignore index ea8c4bf7..8f0678cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +/node_modules diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..ceba34a9 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,28 @@ +{ + "name": "clvm-rs", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "prettier": "^3.3.2" + } + }, + "node_modules/prettier": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..0e5e7447 --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "private": true, + "scripts": { + "prettier": "prettier --check .", + "fmt": "prettier --write ." + }, + "devDependencies": { + "prettier": "^3.3.2" + } +}