cli: eslint.backend: disallow default winston import

This commit is contained in:
Patrik Oldsberg
2020-08-09 10:23:54 +02:00
parent eddaf57616
commit 0a7d3a6538
+10
View File
@@ -55,6 +55,16 @@ module.exports = {
],
// Avoid cross-package imports
'no-restricted-imports': [2, { patterns: ['**/../../**/*/src/**'] }],
// Avoid default import from winston as it breaks at runtime
'no-restricted-syntax': [
'error',
{
message:
'Default import from winston is not allowed, import `* as winston` instead.',
selector:
'ImportDeclaration[source.value="winston"] ImportDefaultSpecifier',
},
],
},
overrides: [
{