Merge pull request #5572 from overleaf/jpa-no-path-concat

[misc] fix eslint violations for node/no-path-concat

GitOrigin-RevId: 5122826fb9ae23c373e8c5a6802ebb35eb20314f
This commit is contained in:
Jakob Ackermann 2021-10-27 11:49:53 +02:00 committed by Copybot
parent 669606f797
commit f6795a324a
14 changed files with 13 additions and 30 deletions

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"node/no-path-concat": "off",
"prefer-regex-literals": "off",
// END of temporary overrides

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"node/no-path-concat": "off",
"prefer-regex-literals": "off",
// END of temporary overrides

View file

@ -1,6 +1,5 @@
/* eslint-disable
camelcase,
no-path-concat,
no-return-assign,
no-unused-vars,
*/
@ -26,7 +25,7 @@ const fixturePath = path => {
if (path.slice(0, 3) === 'tmp') {
return '/tmp/clsi_acceptance_tests' + path.slice(3)
}
return Path.normalize(__dirname + '/../fixtures/' + path)
return Path.join(__dirname, '../fixtures/', path)
}
const process = require('process')
console.log(

View file

@ -1,5 +1,4 @@
/* eslint-disable
no-path-concat,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
@ -10,6 +9,7 @@
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const Path = require('path')
const Client = require('./helpers/Client')
const sinon = require('sinon')
const ClsiApp = require('./helpers/ClsiApp')
@ -21,7 +21,7 @@ const Server = {
const express = require('express')
const app = express()
const staticServer = express.static(__dirname + '/../fixtures/')
const staticServer = express.static(Path.join(__dirname, '../fixtures/'))
app.get('/:random_id/*', (req, res, next) => {
this.getFile(req.url)
req.url = `/${req.params[0]}`

View file

@ -2,10 +2,8 @@ const Path = require('path')
module.exports = {
path: {
// eslint-disable-next-line no-path-concat
compilesDir: Path.resolve(__dirname + '/../../../compiles'),
// eslint-disable-next-line no-path-concat
clsiCacheDir: Path.resolve(__dirname + '/../../../cache'),
compilesDir: Path.join(__dirname, '../../../compiles'),
clsiCacheDir: Path.join(__dirname, '../../../cache'),
// synctexBaseDir: (project_id) -> Path.join(@compilesDir, project_id)
synctexBaseDir() {
return '/compile'

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"node/no-path-concat": "off",
"prefer-regex-literals": "off",
// END of temporary overrides

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"node/no-path-concat": "off",
"prefer-regex-literals": "off",
// END of temporary overrides

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"node/no-path-concat": "off",
"prefer-regex-literals": "off",
// END of temporary overrides

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"node/no-path-concat": "off",
"prefer-regex-literals": "off",
// END of temporary overrides

View file

@ -21,17 +21,14 @@ if (process.env.BACKEND == null) {
process.env.AWS_S3_PUBLIC_FILES_BUCKET_NAME
} else {
process.env.BACKEND = 'fs'
process.env.USER_FILES_BUCKET_NAME = Path.resolve(
// eslint-disable-next-line no-path-concat
__dirname + '/../user_files'
process.env.USER_FILES_BUCKET_NAME = Path.join(__dirname, '../user_files')
process.env.TEMPLATE_FILES_BUCKET_NAME = Path.join(
__dirname,
'../template_files'
)
process.env.TEMPLATE_FILES_BUCKET_NAME = Path.resolve(
// eslint-disable-next-line no-path-concat
__dirname + '/../template_files'
)
process.env.PUBLIC_FILES_BUCKET_NAME = Path.resolve(
// eslint-disable-next-line no-path-concat
__dirname + '/../public_files'
process.env.PUBLIC_FILES_BUCKET_NAME = Path.join(
__dirname,
'../public_files'
)
}
}
@ -103,8 +100,7 @@ const settings = {
},
path: {
// eslint-disable-next-line no-path-concat
uploadFolder: Path.resolve(__dirname + '/../uploads'),
uploadFolder: Path.join(__dirname, '../uploads'),
},
commands: {

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"node/no-path-concat": "off",
"prefer-regex-literals": "off",
// END of temporary overrides

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"node/no-path-concat": "off",
"prefer-regex-literals": "off",
// END of temporary overrides

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"node/no-path-concat": "off",
"prefer-regex-literals": "off",
// END of temporary overrides

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"node/no-path-concat": "off",
"prefer-regex-literals": "off",
// END of temporary overrides