Commit graph

22 commits

Author SHA1 Message Date
Philip Molares
07a4de77d7 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-09 22:18:38 +02:00
Philip Molares
f7e483da81 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-05-02 18:09:16 +02:00
Philip Molares
5099f0f5c5 ESLint: Override config for tests
This is done to to fix Issue #1098

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-16 10:10:52 +02:00
David Mehren
fc1008e773
Enforce the use of function declarations
Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-27 17:54:24 +01:00
David Mehren
9fcc3c6cee
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
ba771fb7b6
Enable ESLint rules with type-checks
Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-26 12:10:53 +01:00
David Mehren
0a337f03c5
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-26 12:10:53 +01:00
David Mehren
3626ce9dff
ESLint: Enable @typescript-eslint/naming-convention rule
This check enforces consistent variable naming.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-26 12:10:53 +01:00
David Mehren
c3129d40e0
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-26 12:10:53 +01:00
David Mehren
6ffeb2e9c9
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-26 12:10:51 +01:00
David Mehren
6a6dc7ea21
ESLint: Re-enable @typescript-eslint/no-explicit-any rule
Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-26 12:10:05 +01:00
Philip Molares
7388cafe45 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
1c9d9942b3
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:16 +01:00
Tilman Vatteroth
0c56466dc1
Change year in copyright to 2021
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-01-06 22:10:19 +01:00
Philip Molares
6896daa62a added reuse information
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-05 22:12:38 +01:00
David Mehren
1aca4a2986
Use default NestJS lint config
Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-20 19:43:06 +02:00
Philip Molares
ad3e25310a
added rule to eslintrc
unused arguments are okay if they only contain '_'s

Reference:
https://eslint.org/docs/rules/no-unused-vars#argsignorepattern

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:06 +02:00
David Mehren
64b88e8488
.eslintrc: Complain about default exports
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:05 +02:00
David Mehren
2c40255ac2
Error on too many semicolons
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:03 +02:00
David Mehren
0228d00c56
Use ESLint and 'typescript-eslint' plugin.
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:03 +02:00
Pedro Ferreira
23f22d1fa6 Add no-console as a warning
Signed-off-by: Pedro Ferreira <pedro@dete.st>
2019-05-12 20:15:46 +02:00
Claudius Coenen
858a59529e switching to eslint for code checking
most rules degraded to WARN, so we don't go insane. This will
change over time. The aim is to conform to a common style

Signed-off-by: Claudius Coenen <opensource@amenthes.de>
2018-11-14 23:15:36 +01:00