Skip to content

Commit 5e9810f

Browse files
committed
more 4 tab files
1 parent bb93831 commit 5e9810f

File tree

4 files changed

+70
-68
lines changed

4 files changed

+70
-68
lines changed

.eslintrc.js

Lines changed: 48 additions & 48 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"],
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-
],
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"],
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+
],
5252
};

.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 }}

examples/widget/utils.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
*/
1616

1717
function parseFragment() {
18-
const fragmentString = window.location.hash || "?";
19-
return new URLSearchParams(fragmentString.substring(Math.max(fragmentString.indexOf("?"), 0)));
18+
const fragmentString = window.location.hash || "?";
19+
return new URLSearchParams(fragmentString.substring(Math.max(fragmentString.indexOf("?"), 0)));
2020
}
2121

2222
function assertParam(fragment, name) {
23-
const val = fragment.get(name);
24-
if (!val) throw new Error(`${name} is not present in URL - cannot load widget`);
25-
return val;
23+
const val = fragment.get(name);
24+
if (!val) throw new Error(`${name} is not present in URL - cannot load widget`);
25+
return val;
2626
}
2727

2828
function handleError(e) {
29-
console.error(e);
30-
document.getElementById("container").innerText = "There was an error with the widget. See JS console for details.";
29+
console.error(e);
30+
document.getElementById("container").innerText = "There was an error with the widget. See JS console for details.";
3131
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
{
3333
"files": [
3434
"src/**/*.ts",
35-
"test/**/*.ts"
35+
"*.js",
36+
"test/**/*.ts",
37+
"*.yml"
3638
],
3739
"options": {
3840
"tabWidth": 4

0 commit comments

Comments
 (0)