Skip to content

Commit

Permalink
Merge pull request privacy-scaling-explorations#834 from privacy-scal…
Browse files Browse the repository at this point in the history
…ing-explorations/editorconfig

chore: add .editorconfig and Prettier for code consistency
  • Loading branch information
baumstern authored Nov 23, 2023
2 parents d003312 + 8b905c0 commit e5d4227
Show file tree
Hide file tree
Showing 174 changed files with 71,667 additions and 71,420 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{ts,js}]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true

[*.{yaml,yml}]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
47 changes: 24 additions & 23 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
],
rules: {
'no-console': 'off',
'no-debugger': 'off',
'no-prototype-builtins': 'off',
'no-constant-condition': ['error', { checkLoops: false }],
'no-empty': ['error', { allowEmptyCatch: true }],
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off'
}
}
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
rules: {
"no-console": "off",
"no-debugger": "off",
"no-prototype-builtins": "off",
"no-constant-condition": ["error", { checkLoops: false }],
"no-empty": ["error", { allowEmptyCatch: true }],
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
},
};
10 changes: 4 additions & 6 deletions .github/workflows/circuit-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,25 @@ name: Circuit

on:
push:
branches: [ master, dev ]
branches: [master, dev]
pull_request:


concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04


steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache: "npm"

- name: Update npm to latest version
run: npm install --global npm@latest
Expand Down Expand Up @@ -52,7 +50,7 @@ jobs:
- name: Build circuits
run: npm run build-test-circuits
working-directory: circuits

- name: Test circuits
run: npm run test
working-directory: circuits
12 changes: 5 additions & 7 deletions .github/workflows/contracts-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,25 @@ name: Contracts

on:
push:
branches: [ master, dev ]
branches: [master, dev]
pull_request:


concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04


steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache: "npm"

- name: Update npm to latest version
run: npm install --global npm@latest
Expand All @@ -39,4 +37,4 @@ jobs:

- name: Test
run: npm run test
working-directory: contracts
working-directory: contracts
12 changes: 5 additions & 7 deletions .github/workflows/core-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,25 @@ name: Core

on:
push:
branches: [ master, dev ]
branches: [master, dev]
pull_request:


concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04


steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache: "npm"

- name: Update npm to latest version
run: npm install --global npm@latest
Expand All @@ -35,4 +33,4 @@ jobs:
- name: Test
run: npm run test
working-directory: core
working-directory: core
10 changes: 4 additions & 6 deletions .github/workflows/crypto-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,25 @@ name: Crypto

on:
push:
branches: [ master, dev ]
branches: [master, dev]
pull_request:


concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04


steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache: "npm"

- name: Update npm to latest version
run: npm install --global npm@latest
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/domainobjs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,25 @@ name: Domainobjs

on:
push:
branches: [ master, dev ]
branches: [master, dev]
pull_request:


concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04


steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache: "npm"

- name: Update npm to latest version
run: npm install --global npm@latest
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,30 @@ name: CI

on:
push:
branches: [ master, dev ]
branches: [master, dev]
pull_request:

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:

e2e:
uses: ./.github/workflows/reusable-e2e.yml

npm-publish:
needs: e2e
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"

- name: Initialize Project
run: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ name: GitHub Pages

on:
push:
branches: [ master, dev ]
branches: [master, dev]
pull_request:

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:

publish:
runs-on: ubuntu-22.04

Expand All @@ -20,7 +19,7 @@ jobs:
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.18'
mdbook-version: "0.4.18"

- name: Build
run: mdbook build
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
schedule:
- cron: 0 0 * * *


jobs:
generate-proving-keys:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -82,18 +81,18 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [ 18, 20 ]
node-version: [18, 20]

steps:
- uses: actions/checkout@v4
with:
ref: dev

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: "npm"

- name: Update npm to latest version
run: npm install --global npm@latest
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: Release

on:
push:
tags: ['*']

push:
tags: ["*"]

jobs:

draft-release:
runs-on: ubuntu-22.04

Expand All @@ -24,12 +22,12 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"

- name: Initialize Project
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/reusable-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
workflow_call:

jobs:

e2e:
runs-on: ubuntu-22.04

Expand All @@ -21,7 +20,7 @@ jobs:
id: get-changed-files
uses: jitterbit/get-changed-files@v1
with:
format: 'csv'
format: "csv"

- name: Check for changes in 'circuit' folder
id: check_changes
Expand All @@ -34,7 +33,7 @@ jobs:
echo "CHANGED=false" >> $GITHUB_ENV
echo "No changes on circuits."
fi
- name: Install dependencies
run: |
sudo apt-get update
Expand Down
Loading

0 comments on commit e5d4227

Please sign in to comment.