Merge pull request #2684 from themousepotato/lintrule-dirname-fix

Add a lint rule to avoid using __dirname
This commit is contained in:
Patrik Oldsberg
2020-10-09 21:03:13 +02:00
committed by GitHub
18 changed files with 24 additions and 0 deletions
+5
View File
@@ -67,6 +67,11 @@ module.exports = {
selector:
'ImportDeclaration[source.value="winston"] ImportDefaultSpecifier',
},
{
message:
"`__dirname` doesn't refer to the same dir in production builds, try `resolvePackagePath()` from `@backstage/backend-common` instead.",
selector: 'Identifier[name="__dirname"]',
},
],
},
overrides: [