diff options
author | Rubén Rincón Blanco <ruben@rinconblanco.es> | 2020-08-04 22:39:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-04 16:39:02 -0400 |
commit | ccff4b9ee5a37c13f0973b52e8f90a8be8359fea (patch) | |
tree | 0022c9364824c5b4e4f5818c4abbf654aa99f2e8 /lib/compilers/wsl-vc.js | |
parent | 7126b39a6bdeabffc312c8a117ec7af072ef6a1c (diff) | |
download | compiler-explorer-ccff4b9ee5a37c13f0973b52e8f90a8be8359fea.tar.gz compiler-explorer-ccff4b9ee5a37c13f0973b52e8f90a8be8359fea.zip |
Add new eslint rules (#2121)
The largest changes here are:
- enforcing single quotes for strings
- enforcing trailing commas where possible
In addition to those we have enabled several eslint plugins:
- plugin:requirejs/recommended, to enforce some conventions in require statements
- plugin:node/recommended, to enforce correct usage of various node.js APIs
- plugin:unicorn/recommended, which contains a pretty mixed bag of useful rules
This PR attempts to not change code behavior when possible. In cases where fixing
existing code would change semantics, a linting exclusion has been placed in the
code base to silence the error. You can find these by searching for `eslint-disable-next-line`.
Co-authored-by: Austin Morton <austinpmorton@gmail.com>
Diffstat (limited to 'lib/compilers/wsl-vc.js')
-rw-r--r-- | lib/compilers/wsl-vc.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compilers/wsl-vc.js b/lib/compilers/wsl-vc.js index f379f89bc..a3cc3060b 100644 --- a/lib/compilers/wsl-vc.js +++ b/lib/compilers/wsl-vc.js @@ -43,7 +43,7 @@ class WslVcCompiler extends Win32VcCompiler { // We know process.env.tmpDir is of format /mnt/X/dir where X is drive letter. const driveLetter = process.env.winTmp.substring(5, 6); const directoryPath = process.env.winTmp.substring(7); - const windowsStyle = driveLetter.concat(":/", directoryPath); + const windowsStyle = driveLetter.concat(':/', directoryPath); return fn.replace(process.env.winTmp, windowsStyle); } @@ -85,7 +85,7 @@ class WslVcCompiler extends Win32VcCompiler { const inputDirectory = path.dirname(inputFilename); const driveLetter = inputDirectory.substring(0, 1).toLowerCase(); const directoryPath = inputDirectory.substring(2).trim(); - execOptions.customCwd = path.join("/mnt", driveLetter, directoryPath); + execOptions.customCwd = path.join('/mnt', driveLetter, directoryPath); return super.runCompiler(compiler, options, inputFilename, execOptions); } |