Commit graph

20 commits

Author SHA1 Message Date
Yannick Bungers
11ae7d133c
Fix tests with using sessions in e2e tests of private api
Signed-off-by: Yannick Bungers <git@innay.de>
2021-10-13 20:43:56 +02:00
David Mehren
dc68ecf0e6
Disable new no-unsafe-argument ESLint rule for tests
Signed-off-by: David Mehren <git@herrmehren.de>
2021-10-13 19:54:38 +02:00
David Mehren
4d60686591
Run prettier format checks in ESLint
This enables the prettier ESLint plugin.
In contrast to the prettier ESLint config (which is already enabled),
the plugin also runs checks against prettiers format rules
as part of ESLint.
This enables instant feedback in the editor,
when code violates the format rules and allows for quick-fix actions.

See also https://github.com/prettier/eslint-plugin-prettier#recommended-configuration

Signed-off-by: David Mehren <git@herrmehren.de>
2021-08-29 19:54:56 +02:00
Philip Molares
8cc9e12bc3
ESLint: Add custom rule 'correct-logger-context'
This rule ensures, that the correct context is given in any logger statements.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-05-02 19:45:47 +02:00
Philip Molares
0933b88ff5
ESLint: Add extra rules for tests
Add afterEach and beforeAll as additional additionalTestBlockFunctions for jest/no-standalone-expect. This is necessary, because we use expects in those functions for the history service unit tests.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 14:02:55 +02:00
Philip Molares
b8d106a4a2
ESLint: Override config for tests
This is done to to fix Issue #1098

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-12 17:02:47 +02:00
David Mehren
b0c5cdaa0d
Enforce the use of function declarations
Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-27 17:54:24 +01:00
David Mehren
b128efebff
Enforce explicit function return types
This re-enables the `@typescript-eslint/explicit-module-boundary-types`
check and also enables the
`@typescript-eslint/explicit-function-return-type` check.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-27 17:41:32 +01:00
David Mehren
68fd375d95
Enable ESLint rules with type-checks
Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-23 21:15:10 +01:00
David Mehren
117e9ec708
ESLint: Remove @typescript-eslint/explicit-function-return-type rule
The rule does not seem to be enabled at all, as it is not part of the
recommended set.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-20 21:27:37 +01:00
David Mehren
e83f1e206b
ESLint: Enable @typescript-eslint/naming-convention rule
This check enforces consistent variable naming.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-20 21:15:45 +01:00
David Mehren
1114127b80
ESLint: Remove @typescript-eslint/interface-name-prefix rule
The check was removed from typescript-eslint and replaced by the
naming-convention rule.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-20 20:41:42 +01:00
David Mehren
9485597e6f
ESLint: Enable @typescript-eslint/return-await rule
This ensures stack traces are helpful at the cost of a slightly
lower performance (one more tick in the event loop).

Fixes #838

Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-20 20:14:36 +01:00
David Mehren
2ba824d9e2
ESLint: Re-enable @typescript-eslint/no-explicit-any rule
Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-24 21:59:28 +01:00
Philip Molares
1ea4bd03d9
ESLint: Remove prettier/@typescript-eslint
This rule no longer exists. According to the documentation on
https://github.com/prettier/eslint-config-prettier#installation this is
not needed anymore.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-02-21 16:51:48 +01:00
David Mehren
2a0b31d1ad
Cleanup ESLint config
The name of the plugin and the recommended config changed at some point, so we adapt to that

Signed-off-by: David Mehren <git@herrmehren.de>
2021-01-06 23:37:05 +01:00
Tilman Vatteroth
7aeaf488c4
Change year in copyright to 2021
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-01-06 21:36:07 +01:00
Philip Molares
dc63c76f43
added reuse information
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-05 22:12:38 +01:00
David Mehren
68f63f0a24
Use default NestJS lint config
Signed-off-by: David Mehren <git@herrmehren.de>
2020-07-24 21:47:41 +02:00
David Mehren
d6d4f35cf5
Import meta-files
These files are imported from HedgeDoc 1 / the master branch.

Signed-off-by: David Mehren <git@herrmehren.de>
2022-01-23 22:02:58 +01:00