mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-25 09:39:34 -04:00
crypto-js, crypto-nodejs: Run prettier in CI
This commit is contained in:
28
.github/workflows/bindings_ci.yml
vendored
28
.github/workflows/bindings_ci.yml
vendored
@@ -75,6 +75,34 @@ jobs:
|
||||
- name: Build library & generate bindings
|
||||
run: target/debug/xtask ci bindings
|
||||
|
||||
lint-js-bindings:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
include:
|
||||
- name: "[m]-crypto-nodejs"
|
||||
path: "bindings/matrix-sdk-crypto-nodejs"
|
||||
- name: "[m]-crypto-js"
|
||||
path: "bindings/matrix-sdk-crypto-js"
|
||||
|
||||
name: lint ${{ matrix.name }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout the repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
|
||||
- name: Install NPM dependencies
|
||||
working-directory: ${{ matrix.path }}
|
||||
run: npm install
|
||||
|
||||
- name: run lint
|
||||
working-directory: ${{ matrix.path }}
|
||||
run: npm run lint
|
||||
|
||||
test-matrix-sdk-crypto-nodejs:
|
||||
name: ${{ matrix.os-name }} [m]-crypto-nodejs, v${{ matrix.node-version }}
|
||||
if: github.event_name == 'push' || !github.event.pull_request.draft
|
||||
|
||||
1
bindings/matrix-sdk-crypto-js/.prettierignore
Normal file
1
bindings/matrix-sdk-crypto-js/.prettierignore
Normal file
@@ -0,0 +1 @@
|
||||
/pkg
|
||||
9
bindings/matrix-sdk-crypto-js/.prettierrc.js
Normal file
9
bindings/matrix-sdk-crypto-js/.prettierrc.js
Normal file
@@ -0,0 +1,9 @@
|
||||
// prettier configuration: the same as the conventions used throughout Matrix.org
|
||||
// see: https://github.com/matrix-org/eslint-plugin-matrix-org/blob/main/.prettierrc.js
|
||||
|
||||
module.exports = {
|
||||
printWidth: 120,
|
||||
tabWidth: 4,
|
||||
quoteProps: "consistent",
|
||||
trailingComma: "all",
|
||||
};
|
||||
@@ -30,6 +30,7 @@
|
||||
"cross-env": "^7.0.3",
|
||||
"fake-indexeddb": "^4.0",
|
||||
"jest": "^28.1.0",
|
||||
"prettier": "^2.8.3",
|
||||
"typedoc": "^0.22.17",
|
||||
"wasm-pack": "^0.10.2",
|
||||
"yargs-parser": "~21.0.1"
|
||||
@@ -38,6 +39,7 @@
|
||||
"node": ">= 10"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "prettier --check .",
|
||||
"build": "./scripts/build.sh",
|
||||
"test": "jest --verbose",
|
||||
"doc": "typedoc --tsconfig .",
|
||||
|
||||
1
bindings/matrix-sdk-crypto-nodejs/.prettierignore
Normal file
1
bindings/matrix-sdk-crypto-nodejs/.prettierignore
Normal file
@@ -0,0 +1 @@
|
||||
/pkg
|
||||
9
bindings/matrix-sdk-crypto-nodejs/.prettierrc.js
Normal file
9
bindings/matrix-sdk-crypto-nodejs/.prettierrc.js
Normal file
@@ -0,0 +1,9 @@
|
||||
// prettier configuration: the same as the conventions used throughout Matrix.org
|
||||
// see: https://github.com/matrix-org/eslint-plugin-matrix-org/blob/main/.prettierrc.js
|
||||
|
||||
module.exports = {
|
||||
printWidth: 120,
|
||||
tabWidth: 4,
|
||||
quoteProps: "consistent",
|
||||
trailingComma: "all",
|
||||
};
|
||||
@@ -15,6 +15,7 @@
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "^2.9.0",
|
||||
"jest": "^28.1.0",
|
||||
"prettier": "^2.8.3",
|
||||
"typedoc": "^0.22.17",
|
||||
"yargs-parser": "~21.0.1"
|
||||
},
|
||||
@@ -22,6 +23,7 @@
|
||||
"node": ">= 14"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "prettier --check .",
|
||||
"release-build": "napi build --platform --release --strip",
|
||||
"build": "napi build --platform",
|
||||
"postinstall": "node download-lib.js",
|
||||
|
||||
Reference in New Issue
Block a user