From 0c3b8913517c663a4edcd9434bb514e45ca21c27 Mon Sep 17 00:00:00 2001 From: David Konsumer <83857+konsumer@users.noreply.github.com> Date: Sat, 15 Feb 2025 18:02:30 -0800 Subject: [PATCH 1/6] Create .prettierrc --- .prettierrc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..46f2aeb --- /dev/null +++ b/.prettierrc @@ -0,0 +1,21 @@ +{ + "arrowParens": "always", + "bracketSameLine": false, + "bracketSpacing": true, + "embeddedLanguageFormatting": "auto", + "endOfLine": "lf", + "htmlWhitespaceSensitivity": "css", + "insertPragma": false, + "jsxSingleQuote": true, + "printWidth": 9999, + "proseWrap": "preserve", + "quoteProps": "as-needed", + "requirePragma": false, + "semi": false, + "singleAttributePerLine": false, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "none", + "useTabs": false, + "vueIndentScriptAndStyle": false +} From a03482a0195bd75e79d6013b6203b350bb60d47b Mon Sep 17 00:00:00 2001 From: David Konsumer <83857+konsumer@users.noreply.github.com> Date: Sat, 15 Feb 2025 18:03:04 -0800 Subject: [PATCH 2/6] Create .clang-format --- .clang-format | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..a8aa7c9 --- /dev/null +++ b/.clang-format @@ -0,0 +1,22 @@ +BasedOnStyle: LLVM +IndentWidth: 2 +UseTab: Never +ColumnLimit: 0 +BinPackArguments: false +BinPackParameters: false +AllowAllArgumentsOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: false +AlwaysBreakAfterReturnType: None +PenaltyBreakAssignment: 100000000 +PenaltyBreakBeforeFirstCallParameter: 100000000 +PenaltyBreakComment: 100000000 +PenaltyBreakFirstLessLess: 100000000 +PenaltyBreakString: 100000000 +PenaltyExcessCharacter: 100000000 +PenaltyReturnTypeOnItsOwnLine: 100000000 +PenaltyIndentedWhitespace: 100000000 +ContinuationIndentWidth: 2 +AlignAfterOpenBracket: DontAlign +AlignOperands: false +BreakBeforeBinaryOperators: None +BreakBeforeTernaryOperators: false From 507177ed5a385837708460b0e290f0bc19643159 Mon Sep 17 00:00:00 2001 From: David Konsumer Date: Sat, 15 Feb 2025 18:27:41 -0800 Subject: [PATCH 3/6] add style-check to test --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b554d70..f43ebb7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,6 +19,8 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + - name: Code Style Check + run: npx -y prettier -c . - name: Cache Node Dependencies id: cache uses: actions/cache@v2 @@ -68,4 +70,4 @@ jobs: path: ./node_modules key: modules-${{ hashFiles('package-lock.json') }} - name: Build for arm - run: docker run --platform linux/arm --rm -v "${PWD}:/work" -w /work node ./tools/crossbuild-drm.sh \ No newline at end of file + run: docker run --platform linux/arm --rm -v "${PWD}:/work" -w /work node ./tools/crossbuild-drm.sh From 1f2b5182dd42c2125692abd06267754f0aadbc31 Mon Sep 17 00:00:00 2001 From: David Konsumer Date: Sat, 15 Feb 2025 18:51:54 -0800 Subject: [PATCH 4/6] move style check outside of tests --- .github/workflows/test.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f43ebb7..83057d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,21 @@ name: Test on: [push] jobs: + style: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Code Style Check + run: npx -y prettier -c . + # run: npx @biomejs/biome format . # do this after we move to biome config + build: strategy: fail-fast: false @@ -19,8 +34,6 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - name: Code Style Check - run: npx -y prettier -c . - name: Cache Node Dependencies id: cache uses: actions/cache@v2 From 5f3d24c71c234ea924a079b11ea2e3bd0e629274 Mon Sep 17 00:00:00 2001 From: David Konsumer Date: Sat, 15 Feb 2025 18:54:07 -0800 Subject: [PATCH 5/6] move style check outside of tests --- .github/workflows/test.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 83057d1..a2c0796 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,10 +10,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} + - uses: actions/setup-node@v2 - name: Code Style Check run: npx -y prettier -c . # run: npx @biomejs/biome format . # do this after we move to biome config From eb0673fa165312907240aad2695530a035c2f7ab Mon Sep 17 00:00:00 2001 From: David Konsumer Date: Sat, 15 Feb 2025 19:00:20 -0800 Subject: [PATCH 6/6] github chnaged badge format --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c9cb607..37064de 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![node-raylib Logo](logo/raylib-node_256x256.png) -# node-raylib [![npm version](http://img.shields.io/npm/v/raylib.svg)](https://npmjs.org/package/raylib "View this project on npm") [![Tests](https://github.com/RobLoach/node-raylib/workflows/Tests/badge.svg)](https://github.com/RobLoach/node-raylib/actions?query=workflow%3ATests+branch%3Amaster "See automated test status on GitHub Actions") +# node-raylib [![npm version](http://img.shields.io/npm/v/raylib.svg)](https://npmjs.org/package/raylib "View this project on npm") [![Tests](https://github.com/RobLoach/node-raylib/actions/workflows/test.yml/badge.svg)](https://github.com/RobLoach/node-raylib/actions/workflows/test.yml "See automated test status on GitHub Actions") [Node.js](https://nodejs.org) bindings for [raylib](https://www.raylib.com/), a simple and easy-to-use library to enjoy videogames programming (www.raylib.com).