Skip to content

Commit

Permalink
Removed the .prettierrc as we already have editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaramanJ committed Feb 12, 2022
1 parent d07cb3e commit 18aa66d
Show file tree
Hide file tree
Showing 123 changed files with 9,452 additions and 9,091 deletions.
22 changes: 11 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ module.exports = {
node: true,
mocha: true,
},
extends: ['standard', 'plugin:mocha/recommended', 'plugin:security/recommended', 'plugin:prettier/recommended'],
plugins: ['mocha', 'security', 'prettier'],
extends: ["standard", "plugin:mocha/recommended", "plugin:security/recommended", "plugin:prettier/recommended"],
plugins: ["mocha", "security", "prettier"],
parserOptions: {
ecmaVersion: 12,
},
globals: {
config: 'readonly',
logger: 'readonly',
config: "readonly",
logger: "readonly",
},
rules: {
// Custom eslint rules
'no-trailing-spaces': 'error',
'consistent-return': 'error',
'no-console': 'error',
"no-trailing-spaces": "error",
"consistent-return": "error",
"no-console": "error",

// Custom mocha rules
'mocha/no-skipped-tests': 'error',
'mocha/no-exclusive-tests': 'error',
"mocha/no-skipped-tests": "error",
"mocha/no-exclusive-tests": "error",

// Prettier for formatting
'prettier/prettier': 'error',
"prettier/prettier": "error",
},
ignorePatterns: ['public/*'],
ignorePatterns: ["public/*"],
};
6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

14 changes: 7 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
const createError = require('http-errors');
const express = require('express');
const { isMulterError, multerErrorHandling } = require('./utils/multer');
const createError = require("http-errors");
const express = require("express");
const { isMulterError, multerErrorHandling } = require("./utils/multer");

// Attach response headers
const responseHeaders = require('./middlewares/responseHeaders');
const responseHeaders = require("./middlewares/responseHeaders");

// import app middlewares
const AppMiddlewares = require('./middlewares');
const AppMiddlewares = require("./middlewares");

// import routes
const indexRouter = require('./routes/index');
const indexRouter = require("./routes/index");

const app = express();

// Add Middlewares, routes
AppMiddlewares(app);
app.use('/', responseHeaders, indexRouter);
app.use("/", responseHeaders, indexRouter);

// catch 404 and forward to error handler
app.use(function (req, res, next) {
Expand Down
54 changes: 27 additions & 27 deletions config/custom-environment-variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,71 +7,71 @@
*/
module.exports = {
port: {
__name: 'PORT',
__format: 'number',
__name: "PORT",
__format: "number",
},
enableFileLogs: {
__name: 'ENABLE_FILE_LOGS',
__format: 'boolean',
__name: "ENABLE_FILE_LOGS",
__format: "boolean",
},
enableConsoleLogs: {
__name: 'ENABLE_CONSOLE_LOGS',
__format: 'boolean',
__name: "ENABLE_CONSOLE_LOGS",
__format: "boolean",
},

githubApi: {
baseUrl: 'GITHUB_API_BASE_URL',
org: 'GITHUB_ORGANISATION',
baseUrl: "GITHUB_API_BASE_URL",
org: "GITHUB_ORGANISATION",
},

githubOauth: {
clientId: 'GITHUB_CLIENT_ID',
clientSecret: 'GITHUB_CLIENT_SECRET',
clientId: "GITHUB_CLIENT_ID",
clientSecret: "GITHUB_CLIENT_SECRET",
},

firestore: 'FIRESTORE_CONFIG',
firestore: "FIRESTORE_CONFIG",

services: {
rdsApi: {
baseUrl: 'SERVICES_RDSAPI_BASEURL',
baseUrl: "SERVICES_RDSAPI_BASEURL",
},

rdsUi: {
baseUrl: 'SERVICES_RDSUI_BASEURL',
baseUrl: "SERVICES_RDSUI_BASEURL",
routes: {
authRedirection: 'SERVICES_RDSUI_ROUTES_AUTH_REDIRECTION',
authRedirection: "SERVICES_RDSUI_ROUTES_AUTH_REDIRECTION",
},
},
},

userToken: {
cookieName: 'COOKIE_NAME',
cookieName: "COOKIE_NAME",
ttl: {
__name: 'USER_TOKEN_TTL',
__format: 'number',
__name: "USER_TOKEN_TTL",
__format: "number",
},
refreshTtl: {
__name: 'USER_TOKEN_REFRESH_TTL',
__format: 'number',
__name: "USER_TOKEN_REFRESH_TTL",
__format: "number",
},
publicKey: 'PUBLIC_KEY',
privateKey: 'PRIVATE_KEY',
publicKey: "PUBLIC_KEY",
privateKey: "PRIVATE_KEY",
},

cloudinary: {
cloud_name: 'CLOUDINARY_CLOUD_NAME',
api_key: 'CLOUDINARY_API_KEY',
api_secret: 'CLOUDINARY_API_SECRET_KEY',
cloud_name: "CLOUDINARY_CLOUD_NAME",
api_key: "CLOUDINARY_API_KEY",
api_secret: "CLOUDINARY_API_SECRET_KEY",
},

integrations: {
newrelic: {
appName: 'INTEGRATIONS_NEWRELIC_APPNAME',
licenseKey: 'INTEGRATIONS_NEWRELIC_LICENSEKEY',
appName: "INTEGRATIONS_NEWRELIC_APPNAME",
licenseKey: "INTEGRATIONS_NEWRELIC_LICENSEKEY",
},
},

routesCacheTTL: {
'/members': 'ROUTESCACHETTL_MEMBERS',
"/members": "ROUTESCACHETTL_MEMBERS",
},
};
30 changes: 15 additions & 15 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ module.exports = {
enableConsoleLogs: false,

githubApi: {
baseUrl: 'https://api.github.com',
org: 'Real-Dev-Squad',
baseUrl: "https://api.github.com",
org: "Real-Dev-Squad",
},

githubOauth: {
clientId: '<clientId>',
clientSecret: '<clientSecret>',
clientId: "<clientId>",
clientSecret: "<clientSecret>",
},

firestore: `{
Expand All @@ -37,13 +37,13 @@ module.exports = {

services: {
rdsApi: {
baseUrl: 'https://api.realdevsquad.com',
baseUrl: "https://api.realdevsquad.com",
},

rdsUi: {
baseUrl: 'https://realdevsquad.com',
baseUrl: "https://realdevsquad.com",
routes: {
authRedirection: '/goto',
authRedirection: "/goto",
},
},
},
Expand All @@ -56,25 +56,25 @@ module.exports = {
cookieName: `rds-session-${NODE_ENV}`,
ttl: 30 * 24 * 60 * 60, // in seconds
refreshTtl: 180 * 24 * 60 * 60, // in seconds
publicKey: '<publicKey>',
privateKey: '<privateKey>',
publicKey: "<publicKey>",
privateKey: "<privateKey>",
},

// Cloudinary keys
cloudinary: {
cloud_name: 'Cloud_name',
api_key: 'API_KEY',
api_secret: 'api_secret_key',
cloud_name: "Cloud_name",
api_key: "API_KEY",
api_secret: "api_secret_key",
},

integrations: {
newrelic: {
appName: 'RDS_API_production',
licenseKey: '<newrelicLicenseKey>',
appName: "RDS_API_production",
licenseKey: "<newrelicLicenseKey>",
},
},

routesCacheTTL: {
'/members': 900,
"/members": 900,
},
};
46 changes: 23 additions & 23 deletions config/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
rdsUi: {
baseUrl: localUrl,
routes: {
authRedirection: '/healthcheck',
authRedirection: "/healthcheck",
},
},
},
Expand All @@ -30,33 +30,33 @@ module.exports = {

userToken: {
publicKey:
'-----BEGIN PUBLIC KEY-----\n' +
'MIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgHo6sGbw8qk+XU9sBVa4w2aEq01i\n' +
'oKDMFFQa9mPy0MRScTCsrfEjbypD4VqIjJcwXGmDWKVhMcJ8SMZuJumIJ10vU9ca\n' +
'WSh/aHhAxiOIqOEe54IyYTwjcn5avdZry3zl62RYQ7tDZCPAR/WvFCIkgRXwjXfC\n' +
'Xpm4LR6ynKDMvsDNAgMBAAE=\n' +
'-----END PUBLIC KEY-----',
"-----BEGIN PUBLIC KEY-----\n" +
"MIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgHo6sGbw8qk+XU9sBVa4w2aEq01i\n" +
"oKDMFFQa9mPy0MRScTCsrfEjbypD4VqIjJcwXGmDWKVhMcJ8SMZuJumIJ10vU9ca\n" +
"WSh/aHhAxiOIqOEe54IyYTwjcn5avdZry3zl62RYQ7tDZCPAR/WvFCIkgRXwjXfC\n" +
"Xpm4LR6ynKDMvsDNAgMBAAE=\n" +
"-----END PUBLIC KEY-----",
privateKey:
'-----BEGIN RSA PRIVATE KEY-----\n' +
'MIICWwIBAAKBgHo6sGbw8qk+XU9sBVa4w2aEq01ioKDMFFQa9mPy0MRScTCsrfEj\n' +
'bypD4VqIjJcwXGmDWKVhMcJ8SMZuJumIJ10vU9caWSh/aHhAxiO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XRceYb0Zi7GFwVP+WeFB3FYO24vw2m01h3i\n" +
"eF5QWRZZO63ACw8gpLbjt9cIJoGU0HG2qa81hc+EuxEIQMxZKYWc4Xh2YeMxZ0Z3\n" +
"vOyd8ZtimVoLnP4rQBiX/NL6uFNJ86kvy4H3v6MGQaBgAQJBAOvwj49kH14XbONp\n" +
"p925+AN5/4m44i0dA4PXfif6qRS/e40Y9c+yvvHhcG7evLo611TZvF0nE/nRcaG0\n" +
"19VXDgECQQCEnx5Yl6DceCGhfSIAA/TmbquTBDXlhQpFxXFlAx0rpVZa9DKyAGFB\n" +
"2Xt+BP0Po9cwV7GSEqjoWXsqpx9AfIrNAkEAgtpRFGqoBuwhBOMlKZCpX2w68Cvs\n" +
"rK6Js4ZBPnUDbzFfmXp9Yeq1gbrRO3wm2XYm1LVJhbRVnNivF8sPZQ+6AQJAOqNk\n" +
"NoWsgW64Z/+89cbKFMzgHdvhvL7rQNhBAAm1byPmn8aTV7LlTclMWfb4sV6e+ef8\n" +
"QnrvpfRSihRktA2dDQJAH+dQBx3nG3bZ9khVAZQ1jTJ7j0cKixaGndFuYS1TJvJ2\n" +
"Zzn584h/xbSIcP9/4SXmEK3wtoueUtMkvS3yKTvk+w==\n" +
"-----END RSA PRIVATE KEY-----",
},

integrations: {
newrelic: {
appName: 'RDS_API_development',
appName: "RDS_API_development",
},
},
};
2 changes: 1 addition & 1 deletion config/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
*/
module.exports = {
userToken: {
cookieName: 'rds-session',
cookieName: "rds-session",
},
};
6 changes: 3 additions & 3 deletions config/staging.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ module.exports = {
enableConsoleLogs: true,

githubOauth: {
clientId: 'c4a84431feaf604e89d1',
clientId: "c4a84431feaf604e89d1",
},

services: {
rdsApi: {
baseUrl: 'https://staging-api.realdevsquad.com',
baseUrl: "https://staging-api.realdevsquad.com",
},
},

Expand All @@ -22,7 +22,7 @@ module.exports = {

integrations: {
newrelic: {
appName: 'RDS_API_staging',
appName: "RDS_API_staging",
},
},
};
Loading

0 comments on commit 18aa66d

Please sign in to comment.