avoid usage of to*Case + add project lint rule

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-10-02 14:01:50 +02:00
parent 9697e91074
commit ca0559444c
25 changed files with 101 additions and 33 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ export function findPaths(searchDir: string): Paths {
// Drive letter can end up being lowercased here on Windows, bring back to uppercase for consistency
const targetDir = fs
.realpathSync(process.cwd())
.replace(/^[a-z]:/, str => str.toUpperCase());
.replace(/^[a-z]:/, str => str.toLocaleUpperCase('en-US'));
// Lazy load this as it will throw an error if we're not inside the Backstage repo.
let ownRoot = '';