Commit Graph

7 Commits

Author SHA1 Message Date
gnuxie
6c23c747de ThrottlingQueue was supressing errors in unit tests. 2024-09-11 17:08:00 +01:00
Gnuxie
337a6a3b76 Add reuse.software (#486)
We have a lot of verbose headers, and i think now is the best opportunity we have to become reuse compliant given that we just did two other similar maintenance changes (prettier, typescirpt5 & eslint9 & typescript-eslint).

* synapse_antispam resuse headers.

* delete old unused tslint.json.

* Add REUSE to pre-commit config.

* reuse info for config directory.
2024-07-25 10:58:40 +01:00
pre-commit-ci[bot]
3b2036c2db prettier all files 2024-07-22 19:13:57 +01:00
Gnuxie
8973db487b Migrate to eslint-9 flat config, typescript 5, typescript-eslint strictTypeChecked (#476)
* Migrate to eslint-9 strictTypeChecked & typescript 5.

* Update to MPS 0.23.0.

Required for strict type checks.

* Looks like we found a test that was complete garbage, amazing really.

* FIXUP

* Well, the command handler was bugged previously...

The command handler used to always only return the command
without the prefix due to an operator precedence bug.
This meant that when we made the order of operations explicit,
we were now including the prefix of the command in the copy.
So when we parsed arguments the code wasn't expecting the prefix
to be there.

* update to MPS 0.23.1.

MPS 0.23.0 was bugged because we didn't enable
`noUncheckedIndexedAccess` while upgrading to typescript 5.

* Make sure eslint runs on all ts files.

* eslint fixes.

* enable `noUncheckedIndexedAccess` & `exactOptionalPropertyTypes`.

* eslint ignores is clearly not understood by me.

* Update SuperCoolStream for eslint and ts5.

* stricter eslint done i thinks

* Whoops, added on .only somewhere.

* Update MPS.

* fix broken test realted things.

* Well I guess that part of getMessagesByUserIn was part of the interface.

* Fix redactionCommandTest.

* Account for escapeHTML in tests.

* Fix tests.

* stuff not matching with .editorconfig fixes.

* Fix appservice webAPI test.

* Update for MPS 0.23.3.
2024-07-22 16:54:04 +01:00
gnuxie
1d0c57cea8 fix throttleQueueTest 2024-04-06 20:03:37 +01:00
Aminda Suomalainen
e4c02b96cd Add pre-commit configuration (#34)
* add .pre-commit-config.yaml

Signed-off-by: Aminda Suomalainen <suomalainen+git@mikaela.info>

* .editorconfig: decrease indent size for text

* .pre-commit-config.yaml: remove prettier

Signed-off-by: Aminda Suomalainen <suomalainen+git@mikaela.info>

* .editorconfig consistency.

* .pre-commit-config.yaml: restore sample hooks

* .editorconfig: disable indent_size for LICENSE & NOTICE

* pre-commit run --all-files

* tsconfig.json: tabs to spaces

* .pre-commit-config.yaml: update editorconfig-checker to 2.7.2

* .editorconfig: disable indent_size for markdown

* mjolnir-entrypoint.sh: retab

* .editorconfig: also exclude json from indent checking

* test/nginx.conf: retab

* test/integration/commands/redactCommandTest.ts: remove leading space

* retab or remove leading whitespaces for the rest of the files

* src/appservice/datastore.ts remove newlines

* test/integration/commands/roomTest.ts: remove leading space.

---------

Signed-off-by: Aminda Suomalainen <suomalainen+git@mikaela.info>
Co-authored-by: gnuxie <Gnuxie@protonmail.com>
2023-08-29 13:38:00 +01:00
David Teller
0eea04bd69 A background queue for kicking (#296)
A background queue for kicking
2022-06-08 11:49:43 +02:00