ci(backend-review.yml): add linter step to the backend review workflow (#625)

* ci(backend-review.yml): add linter step to the backend review workflow

* chore(backend-review.yml): remove prettier from lint-action configuration

* chore: apply new linting workflow

* chore(lint-staged.config.js): reorder lint-staged tasks for JavaScript and TypeScript files

* chore(eslint): update ignorePatterns in .eslintrc.js
chore(lint-action): remove prettier option in backend-review.yml
chore(package.json): add lint and lint:fix scripts

* chore(lint-staged.config.js): remove prettier --write command for js, jsx, ts, tsx files

* chore(titleConvo.js): remove unnecessary console.log statement
chore(titleConvo.js): add missing comma in options object

* chore: apply linting to all files

* chore(lint-staged.config.js): update lint-staged configuration to include prettier formatting
This commit is contained in:
Danny Avila 2023-07-14 09:36:49 -04:00 committed by GitHub
parent 637bb6bc11
commit e5336039fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
231 changed files with 1688 additions and 1526 deletions

View file

@ -40,7 +40,7 @@ class Env {
} else {
console.warn('The default .env file was not found');
}
const environment = this.currentEnvironment();
// Load the environment specific env file
@ -95,8 +95,8 @@ class Env {
/**
* Resolve the location of the env file
*
* @param {String} envFile
* @returns
* @param {String} envFile
* @returns
*/
resolve(envFile) {
return path.resolve(process.cwd(), envFile);
@ -157,7 +157,7 @@ class Env {
}
// Skip lines with quotes and numbers already
// Todo: this could be one regex
const wrappedValue = value.includes(' ') && ! value.includes('"') && ! value.includes("'") && !/\d/.test(value) ? `"${value}"` : value;
const wrappedValue = value.includes(' ') && ! value.includes('"') && ! value.includes('\'') && !/\d/.test(value) ? `"${value}"` : value;
return `${key}=${wrappedValue}`;
});
@ -165,12 +165,11 @@ class Env {
fs.writeFileSync(filePath, updatedContent);
}
/**
* Generate Secure Random Strings
*
* @param {Number} length The length of the random string
* @returns
* @returns
*/
generateSecureRandomString(length = 32) {
return crypto.randomBytes(length).toString('hex');
@ -186,8 +185,8 @@ class Env {
/**
* Get an environment variable
*
* @param {String} variable
* @returns
* @param {String} variable
* @returns
*/
get(variable) {
return process.env[variable];