Merge pull request #1879 from spotify/rugvip/no-win

cli: eslint.backend: disallow default winston import
This commit is contained in:
Patrik Oldsberg
2020-08-09 11:03:14 +02:00
committed by GitHub
+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: [
{