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>
This commit is contained in:
Philip Molares 2021-05-02 19:45:47 +02:00 committed by David Mehren
parent 375cb4eae9
commit 8cc9e12bc3
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
4 changed files with 66 additions and 1 deletions

View file

@ -33,7 +33,7 @@ module.exports = {
},
},
],
plugins: ['@typescript-eslint', 'jest'],
plugins: ['@typescript-eslint', 'jest', 'eslint-plugin-local-rules'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
@ -46,6 +46,7 @@ module.exports = {
jest: true,
},
rules: {
'local-rules/correct-logger-context': 'error',
'func-style': ['error', 'declaration'],
'@typescript-eslint/no-unused-vars': [
'warn',