Commit Graph

13 Commits

Author SHA1 Message Date
Konrad Borowski
1a9bfa044a
Require a digit to follow port number in links (#7644) 2020-11-05 04:44:28 -08:00
Guangcong Luo
9d87616176
Add more style linting rules (#7537)
* Lint arrow-body-style

* Lint prefer-object-spread

Object spread is faster _and_ more readable.

This also fixes a few unnecessary object clones.

* Enable no-parameter-properties

This isn't currently used, but this makes clear that it shouldn't be.

* Refactor more Promises to async/await

* Remove unnecessary code from getDataMoveHTML etc

* Lint prefer-string-starts-ends-with

* Stop using no-undef

According to the typescript-eslint FAQ, this is redundant with
TypeScript, and they're not wrong. This will save us from needing to
specify globals in two different places which will be nice.
2020-10-19 02:42:28 -07:00
Kris Johnson
d9b3a510ad
TextFormatter: Support replacing \n without trusted (#7507) 2020-10-11 13:38:34 -07:00
Annika
05a9f9a1e5
Minor code quality improvements based on LGTM (#7092) 2020-07-30 14:24:37 -07:00
Kris Johnson
77e4a8ad6f
Add type and category support for <psicon> (#6983) 2020-07-18 18:05:19 -07:00
Guangcong Luo
efa98a08b9 Improve linkRegex
We're now using regexfree for linkRegex as well as the indentation
rule.

https://zarel.github.io/regexfree/
2020-03-08 20:16:53 -07:00
Guangcong Luo
b21c9047e2
Migrate to typescript-eslint (#6342) 2020-03-05 08:33:06 -08:00
Waleed Hassan
28e870c4fb Server: Use readonly where appropriate (#5902) 2019-10-21 16:12:32 +10:30
Guangcong Luo
e0a2cf07e1 Correctly define global types for .ts files
Global types are defined differently for `.ts` files than for `.js`
files, leading to some confusion for past refactors.

This commit defines them correctly.

I'm also considering making certain global types only available under
namespaces, but I don't want to do that to `User` or `Room`, so for
now, there are no changes there, besides putting streams in the
`Streams` namespace (so `WriteStream` is now `Streams.WriteStream`).
2019-08-23 09:33:49 -07:00
TheJetOU
3c3d897b92 Move JSDoc comments from assignment to declaration (#5701)
This makes IntelliSense show the JSDoc comment.
2019-08-13 17:25:29 +02:00
HoeenHero
e5b575f950 Implement Chat.stripFormatting (#5658)
Strips chat formatting from a string.
This is used for properly validating the length of room faqs
and daily spotlights.
2019-08-01 00:08:11 -05:00
Kirk Scheibelhut
3d24166cdf toId -> toID
Closes #5479
2019-05-12 17:53:01 -07:00
jetou
9a7ce703f2 TypeScript server/chat formatter.js (#5495) 2019-05-10 09:23:46 -07:00