Skip to content

Commit 930f191

Browse files
committed
Merged changes from upstream/develop
2 parents a0fa7e4 + 549d770 commit 930f191

File tree

874 files changed

+27174
-17196
lines changed

Some content is hidden

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

874 files changed

+27174
-17196
lines changed

.eslintignore.errorfiles

-16
This file was deleted.

.eslintrc.js

+55-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
module.exports = {
2-
extends: ["matrix-org", "matrix-org/react-legacy"],
3-
parser: "babel-eslint",
4-
2+
plugins: ["matrix-org"],
3+
extends: [
4+
"plugin:matrix-org/babel",
5+
"plugin:matrix-org/react",
6+
],
57
env: {
68
browser: true,
79
node: true,
@@ -15,21 +17,64 @@ module.exports = {
1517
"prefer-promise-reject-errors": "off",
1618
"no-async-promise-executor": "off",
1719
"quotes": "off",
18-
},
20+
"no-extra-boolean-cast": "off",
21+
22+
// Bind or arrow functions in props causes performance issues (but we
23+
// currently use them in some places).
24+
// It's disabled here, but we should using it sparingly.
25+
"react/jsx-no-bind": "off",
26+
"react/jsx-key": ["error"],
1927

28+
"no-restricted-properties": [
29+
"error",
30+
...buildRestrictedPropertiesOptions(
31+
["window.innerHeight", "window.innerWidth", "window.visualViewport"],
32+
"Use UIStore to access window dimensions instead.",
33+
),
34+
...buildRestrictedPropertiesOptions(
35+
["*.mxcUrlToHttp", "*.getHttpUriForMxc"],
36+
"Use Media helper instead to centralise access for customisation.",
37+
),
38+
],
39+
},
2040
overrides: [{
21-
"files": ["src/**/*.{ts,tsx}"],
22-
"extends": ["matrix-org/ts"],
23-
"rules": {
41+
files: [
42+
"src/**/*.{ts,tsx}",
43+
"test/**/*.{ts,tsx}",
44+
],
45+
extends: [
46+
"plugin:matrix-org/typescript",
47+
"plugin:matrix-org/react",
48+
],
49+
rules: {
50+
// Things we do that break the ideal style
51+
"prefer-promise-reject-errors": "off",
52+
"quotes": "off",
53+
"no-extra-boolean-cast": "off",
54+
55+
// Remove Babel things manually due to override limitations
56+
"@babel/no-invalid-this": ["off"],
57+
2458
// We're okay being explicit at the moment
2559
"@typescript-eslint/no-empty-interface": "off",
2660
// We disable this while we're transitioning
2761
"@typescript-eslint/no-explicit-any": "off",
2862
// We'd rather not do this but we do
2963
"@typescript-eslint/ban-ts-comment": "off",
30-
31-
"quotes": "off",
32-
"no-extra-boolean-cast": "off",
3364
},
3465
}],
3566
};
67+
68+
function buildRestrictedPropertiesOptions(properties, message) {
69+
return properties.map(prop => {
70+
let [object, property] = prop.split(".");
71+
if (object === "*") {
72+
object = undefined;
73+
}
74+
return {
75+
object,
76+
property,
77+
message,
78+
};
79+
});
80+
}

.flowconfig

-6
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<!-- Please read https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.rst before submitting your pull request -->
2+
3+
<!-- Include a Sign-Off as described in https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.rst#sign-off -->

.github/workflows/develop.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Develop
2+
on:
3+
push:
4+
branches: [develop]
5+
pull_request:
6+
branches: [develop]
7+
jobs:
8+
end-to-end:
9+
runs-on: ubuntu-latest
10+
container: vectorim/element-web-ci-e2etests-env:latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
- name: Prepare End-to-End tests
15+
run: ./scripts/ci/prepare-end-to-end-tests.sh
16+
- name: Run End-to-End tests
17+
run: ./scripts/ci/run-end-to-end-tests.sh
18+
- name: Archive logs
19+
uses: actions/upload-artifact@v2
20+
if: ${{ always() }}
21+
with:
22+
path: |
23+
test/end-to-end-tests/logs/**/*
24+
test/end-to-end-tests/synapse/installations/consent/homeserver.log
25+
retention-days: 14
26+
- name: Download previous benchmark data
27+
uses: actions/cache@v1
28+
with:
29+
path: ./cache
30+
key: ${{ runner.os }}-benchmark
31+
- name: Store benchmark result
32+
uses: matrix-org/github-action-benchmark@jsperfentry-1
33+
with:
34+
tool: 'jsperformanceentry'
35+
output-file-path: test/end-to-end-tests/performance-entries.json
36+
fail-on-alert: false
37+
comment-on-alert: false
38+
# Only temporary to monitor where failures occur
39+
alert-comment-cc-users: '@gsouquet'
40+
github-token: ${{ secrets.DEPLOY_GH_PAGES }}
41+
auto-push: ${{ github.ref == 'refs/heads/develop' }}

0 commit comments

Comments
 (0)