Skip to content

Commit 5a1fdea

Browse files
Merge tag 'v3.6.0' into AMP.chat
[Full Changelog](matrix-org/matrix-react-sdk@v3.6.0-rc.1...v3.6.0) * Upgrade JS SDK to 8.5.0 * [Release] Fix templating for v1 jitsi widgets [\matrix-org#5306](matrix-org#5306) * [Release] Use new preparing event for widget communications [\matrix-org#5304](matrix-org#5304) Change-Id: Ia0572048c370cf386992faab220330afb8693393
2 parents d730c2f + 2242e6b commit 5a1fdea

File tree

981 files changed

+43801
-34883
lines changed

Some content is hidden

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

981 files changed

+43801
-34883
lines changed

.eslintignore.errorfiles

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
src/components/structures/RoomDirectory.js
44
src/components/structures/RoomStatusBar.js
5-
src/components/structures/RoomView.js
65
src/components/structures/ScrollPanel.js
76
src/components/structures/SearchBox.js
87
src/components/structures/UploadBar.js

.eslintrc.js

Lines changed: 25 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,34 @@
1-
const path = require('path');
2-
3-
// get the path of the js-sdk so we can extend the config
4-
// eslint supports loading extended configs by module,
5-
// but only if they come from a module that starts with eslint-config-
6-
// So we load the filename directly (and it could be in node_modules/
7-
// or or ../node_modules/ etc)
8-
//
9-
// We add a `..` to the end because the js-sdk lives out of lib/, but the eslint
10-
// config is at the project root.
11-
const matrixJsSdkPath = path.join(path.dirname(require.resolve('matrix-js-sdk')), '..');
12-
131
module.exports = {
2+
extends: ["matrix-org", "matrix-org/react-legacy"],
143
parser: "babel-eslint",
15-
extends: [matrixJsSdkPath + "/.eslintrc.js"],
16-
plugins: [
17-
"react",
18-
"react-hooks",
19-
"flowtype",
20-
"babel"
21-
],
22-
globals: {
23-
LANGUAGES_FILE: "readonly",
24-
},
4+
255
env: {
26-
es6: true,
6+
browser: true,
7+
node: true,
278
},
28-
parserOptions: {
29-
ecmaFeatures: {
30-
jsx: true,
31-
legacyDecorators: true,
32-
}
9+
globals: {
10+
LANGUAGES_FILE: "readonly",
3311
},
3412
rules: {
35-
// eslint's built in no-invalid-this rule breaks with class properties
36-
"no-invalid-this": "off",
37-
// so we replace it with a version that is class property aware
38-
"babel/no-invalid-this": "error",
39-
40-
// We appear to follow this most of the time, so let's enforce it instead
41-
// of occasionally following it (or catching it in review)
42-
"keyword-spacing": "error",
43-
44-
/** react **/
45-
// This just uses the react plugin to help eslint known when
46-
// variables have been used in JSX
47-
"react/jsx-uses-vars": "error",
48-
// Don't mark React as unused if we're using JSX
49-
"react/jsx-uses-react": "error",
50-
51-
// bind or arrow function in props causes performance issues
52-
// (but we currently use them in some places)
53-
// It's disabled here, but we should using it sparingly.
54-
"react/jsx-no-bind": "off",
55-
"react/jsx-key": ["error"],
56-
57-
// Components in JSX should always be defined.
58-
"react/jsx-no-undef": "error",
59-
60-
// Assert no spacing in JSX curly brackets
61-
// <Element prop={ consideredError} prop={notConsideredError} />
62-
//
63-
// https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/docs/rules/jsx-curly-spacing.md
64-
//
65-
// Disabled for now - if anything we'd like to *enforce* spacing in JSX
66-
// curly brackets for legibility, but in practice it's not clear that the
67-
// consistency particularly improves legibility here. --Matthew
68-
//
69-
// "react/jsx-curly-spacing": ["error", {"when": "never", "children": {"when": "always"}}],
70-
71-
// Assert spacing before self-closing JSX tags, and no spacing before or
72-
// after the closing slash, and no spacing after the opening bracket of
73-
// the opening tag or closing tag.
74-
//
75-
// https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/docs/rules/jsx-tag-spacing.md
76-
"react/jsx-tag-spacing": ["error"],
77-
78-
/** flowtype **/
79-
"flowtype/require-parameter-type": ["warn", {
80-
"excludeArrowFunctions": true,
81-
}],
82-
"flowtype/define-flow-type": "warn",
83-
"flowtype/require-return-type": ["warn",
84-
"always",
85-
{
86-
"annotateUndefined": "never",
87-
"excludeArrowFunctions": true,
88-
}
89-
],
90-
"flowtype/space-after-type-colon": ["warn", "always"],
91-
"flowtype/space-before-type-colon": ["warn", "never"],
92-
93-
/*
94-
* things that are errors in the js-sdk config that the current
95-
* code does not adhere to, turned down to warn
96-
*/
97-
"max-len": ["warn", {
98-
// apparently people believe the length limit shouldn't apply
99-
// to JSX.
100-
ignorePattern: '^\\s*<',
101-
ignoreComments: true,
102-
ignoreRegExpLiterals: true,
103-
code: 120,
104-
}],
105-
"valid-jsdoc": ["warn"],
106-
"new-cap": ["warn"],
107-
"key-spacing": ["warn"],
108-
"prefer-const": ["warn"],
109-
110-
// crashes currently: https://github.com/eslint/eslint/issues/6274
111-
"generator-star-spacing": "off",
112-
113-
"react-hooks/rules-of-hooks": "error",
114-
"react-hooks/exhaustive-deps": "warn",
13+
// Things we do that break the ideal style
14+
"no-constant-condition": "off",
15+
"prefer-promise-reject-errors": "off",
16+
"no-async-promise-executor": "off",
17+
"quotes": "off",
18+
"indent": "off",
11519
},
116-
settings: {
117-
flowtype: {
118-
onlyFilesWithFlowAnnotation: true
20+
21+
overrides: [{
22+
"files": ["src/**/*.{ts,tsx}"],
23+
"extends": ["matrix-org/ts"],
24+
"rules": {
25+
// We disable this while we're transitioning
26+
"@typescript-eslint/no-explicit-any": "off",
27+
// We'd rather not do this but we do
28+
"@typescript-eslint/ban-ts-comment": "off",
29+
30+
"quotes": "off",
31+
"no-extra-boolean-cast": "off",
11932
},
120-
},
33+
}],
12134
};

.stylelintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717
"at-rule-no-unknown": null,
1818
"no-descending-specificity": null,
1919
"scss/at-rule-no-unknown": [true, {
20-
// https://github.com/vector-im/riot-web/issues/10544
20+
// https://github.com/vector-im/element-web/issues/10544
2121
"ignoreAtRules": ["define-mixin"],
2222
}],
2323
}

0 commit comments

Comments
 (0)