crypto-js, crypto-nodejs: Run prettier in CI

This commit is contained in:
Richard van der Hoff
2023-02-15 12:02:29 +00:00
parent 3f8590f86d
commit e16c113db0
7 changed files with 52 additions and 0 deletions

View File

@@ -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

View File

@@ -0,0 +1 @@
/pkg

View 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",
};

View File

@@ -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 .",

View File

@@ -0,0 +1 @@
/pkg

View 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",
};

View File

@@ -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",