Skip to content

Commit 5b25823

Browse files
committed
back to 4 spaces
1 parent ccff9cd commit 5b25823

File tree

75 files changed

+8486
-8180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+8486
-8180
lines changed

.babelrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"sourceMaps": true,
3-
"presets": ["@babel/preset-env", "@babel/preset-typescript"],
4-
"plugins": ["@babel/plugin-proposal-class-properties"]
2+
"sourceMaps": true,
3+
"presets": ["@babel/preset-env", "@babel/preset-typescript"],
4+
"plugins": ["@babel/plugin-proposal-class-properties"]
55
}

.eslintrc.js

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
module.exports = {
2-
plugins: ["matrix-org"],
3-
extends: ["plugin:matrix-org/babel"],
4-
parserOptions: {
5-
project: ["./tsconfig-dev.json"],
6-
},
7-
env: {
8-
browser: true,
9-
},
10-
rules: {
11-
"no-var": ["warn"],
12-
"prefer-rest-params": ["warn"],
13-
"prefer-spread": ["warn"],
14-
"one-var": ["warn"],
15-
"padded-blocks": ["warn"],
16-
"no-extend-native": ["warn"],
17-
camelcase: ["warn"],
18-
"no-multi-spaces": ["error", { ignoreEOLComments: true }],
19-
"space-before-function-paren": [
20-
"error",
21-
{
22-
anonymous: "never",
23-
named: "never",
24-
asyncArrow: "always",
25-
},
26-
],
27-
"arrow-parens": "off",
28-
"prefer-promise-reject-errors": "off",
29-
quotes: "off",
30-
indent: "off",
31-
"no-constant-condition": "off",
32-
"no-async-promise-executor": "off",
33-
},
34-
overrides: [
35-
{
36-
files: ["src/**/*.ts", "test/**/*.ts"],
37-
extends: ["plugin:matrix-org/typescript", "prettier"],
38-
rules: {
39-
// TypeScript has its own version of this
40-
"babel/no-invalid-this": "off",
41-
42-
quotes: "off",
43-
},
2+
plugins: ["matrix-org"],
3+
extends: ["plugin:matrix-org/babel"],
4+
parserOptions: {
5+
project: ["./tsconfig-dev.json"],
446
},
45-
{
46-
files: ["src/interfaces/**/*.ts"],
47-
rules: {
48-
"@typescript-eslint/no-empty-object-type": "off",
49-
},
7+
env: {
8+
browser: true,
509
},
51-
],
52-
};
10+
rules: {
11+
"no-var": ["warn"],
12+
"prefer-rest-params": ["warn"],
13+
"prefer-spread": ["warn"],
14+
"one-var": ["warn"],
15+
"padded-blocks": ["warn"],
16+
"no-extend-native": ["warn"],
17+
camelcase: ["warn"],
18+
"no-multi-spaces": ["error", { ignoreEOLComments: true }],
19+
"space-before-function-paren": [
20+
"error",
21+
{
22+
anonymous: "never",
23+
named: "never",
24+
asyncArrow: "always",
25+
},
26+
],
27+
"arrow-parens": "off",
28+
"prefer-promise-reject-errors": "off",
29+
quotes: "off",
30+
indent: "off",
31+
"no-constant-condition": "off",
32+
"no-async-promise-executor": "off",
33+
},
34+
overrides: [
35+
{
36+
files: ["src/**/*.ts", "test/**/*.ts"],
37+
extends: ["plugin:matrix-org/typescript", "prettier"],
38+
rules: {
39+
// TypeScript has its own version of this
40+
"babel/no-invalid-this": "off",
41+
42+
quotes: "off",
43+
},
44+
},
45+
{
46+
files: ["src/interfaces/**/*.ts"],
47+
rules: {
48+
"@typescript-eslint/no-empty-object-type": "off",
49+
},
50+
},
51+
],
52+
}

.github/workflows/build.yaml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
name: Build and test
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
88

99
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
15-
- name: Setup Node.js
16-
uses: actions/setup-node@v4
17-
with:
18-
cache: "yarn"
19-
20-
- name: Install NPM packages
21-
run: yarn install --frozen-lockfile
22-
23-
- name: Check Linting Rules and Types
24-
run: yarn lint
25-
26-
- name: test
27-
run: yarn test --coverage
28-
29-
- name: Upload coverage
30-
uses: actions/upload-artifact@v4
31-
with:
32-
name: coverage
33-
path: |
34-
coverage
35-
!coverage/lcov-report
36-
37-
- name: build
38-
run: yarn build
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
cache: "yarn"
19+
20+
- name: Install NPM packages
21+
run: yarn install --frozen-lockfile
22+
23+
- name: Check Linting Rules and Types
24+
run: yarn lint
25+
26+
- name: test
27+
run: yarn test --coverage
28+
29+
- name: Upload coverage
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: coverage
33+
path: |
34+
coverage
35+
!coverage/lcov-report
36+
37+
- name: build
38+
run: yarn build

.github/workflows/release.yaml

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
name: Release Automation
22
on:
3-
workflow_dispatch:
4-
inputs:
5-
version-bump:
6-
description: The scale of the version bump required for semver compatibility
7-
required: true
8-
default: patch
9-
type: choice
10-
options:
11-
- patch
12-
- minor
13-
- major
3+
workflow_dispatch:
4+
inputs:
5+
version-bump:
6+
description: The scale of the version bump required for semver compatibility
7+
required: true
8+
default: patch
9+
type: choice
10+
options:
11+
- patch
12+
- minor
13+
- major
1414
concurrency: release
1515
permissions:
16-
contents: write
16+
contents: write
1717
jobs:
18-
release:
19-
name: "Release & Publish"
20-
runs-on: ubuntu-latest
21-
steps:
22-
- name: 🧮 Checkout code
23-
uses: actions/checkout@v4
24-
with:
25-
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
18+
release:
19+
name: "Release & Publish"
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: 🧮 Checkout code
23+
uses: actions/checkout@v4
24+
with:
25+
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
2626

27-
- name: 🔧 Set up node environment
28-
uses: actions/setup-node@v4
29-
with:
30-
cache: "yarn"
27+
- name: 🔧 Set up node environment
28+
uses: actions/setup-node@v4
29+
with:
30+
cache: "yarn"
3131

32-
- name: 🛠️ Setup
33-
run: yarn install --pure-lockfile
32+
- name: 🛠️ Setup
33+
run: yarn install --pure-lockfile
3434

35-
- name: 👊 Bump version
36-
run: |
37-
yarn version --no-git-tag-version --${{ github.event.inputs.version-bump }}
38-
git config --global user.name 'ElementRobot'
39-
git config --global user.email '[email protected]'
40-
git commit -am "${{ github.event.inputs.version-bump }} version bump"
41-
git push
35+
- name: 👊 Bump version
36+
run: |
37+
yarn version --no-git-tag-version --${{ github.event.inputs.version-bump }}
38+
git config --global user.name 'ElementRobot'
39+
git config --global user.email '[email protected]'
40+
git commit -am "${{ github.event.inputs.version-bump }} version bump"
41+
git push
4242
43-
- name: 📖 Build lib
44-
run: yarn build
43+
- name: 📖 Build lib
44+
run: yarn build
4545

46-
- name: 🚀 Publish to npm
47-
id: npm-publish
48-
uses: JS-DevTools/npm-publish@v3
49-
with:
50-
token: ${{ secrets.NPM_TOKEN }}
51-
access: public
46+
- name: 🚀 Publish to npm
47+
id: npm-publish
48+
uses: JS-DevTools/npm-publish@v3
49+
with:
50+
token: ${{ secrets.NPM_TOKEN }}
51+
access: public
5252

53-
- name: 🧬 Create release
54-
uses: softprops/action-gh-release@v2
55-
with:
56-
tag_name: v${{ steps.npm-publish.outputs.version }}
57-
body: ${{ steps.npm-publish.outputs.version }} Release
58-
draft: false
59-
prerelease: false
53+
- name: 🧬 Create release
54+
uses: softprops/action-gh-release@v2
55+
with:
56+
tag_name: v${{ steps.npm-publish.outputs.version }}
57+
body: ${{ steps.npm-publish.outputs.version }} Release
58+
draft: false
59+
prerelease: false

.github/workflows/sonarqube.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: SonarQube
22
on:
3-
workflow_run:
4-
workflows: ["Build and test"]
5-
types:
6-
- completed
3+
workflow_run:
4+
workflows: ["Build and test"]
5+
types:
6+
- completed
77
concurrency:
8-
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
9-
cancel-in-progress: true
8+
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
9+
cancel-in-progress: true
1010
jobs:
11-
sonarqube:
12-
name: 🩻 SonarQube
13-
uses: matrix-org/matrix-js-sdk/.github/workflows/sonarcloud.yml@develop
14-
secrets:
15-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
16-
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
11+
sonarqube:
12+
name: 🩻 SonarQube
13+
uses: matrix-org/matrix-js-sdk/.github/workflows/sonarcloud.yml@develop
14+
secrets:
15+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
16+
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"tabWidth": 4,
3+
"semi": false
4+
}

0 commit comments

Comments
 (0)