mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-10 20:02:26 +00:00
Fix ESLint issues: prefer-const warnings and missing semicolons
Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com>
This commit is contained in:
@@ -23,9 +23,8 @@ export default async function migration() {
|
||||
}
|
||||
|
||||
// Read and parse the YAML file
|
||||
let rawConfig: any;
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
rawConfig = yaml.load(fileContents);
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
|
||||
delete rawConfig.server.secure_cookies;
|
||||
|
||||
|
||||
@@ -25,9 +25,8 @@ export default async function migration() {
|
||||
}
|
||||
|
||||
// Read and parse the YAML file
|
||||
let rawConfig: any;
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
rawConfig = yaml.load(fileContents);
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
|
||||
if (!rawConfig.flags) {
|
||||
rawConfig.flags = {};
|
||||
|
||||
@@ -30,9 +30,8 @@ export default async function migration() {
|
||||
}
|
||||
|
||||
// Read and parse the YAML file
|
||||
let rawConfig: any;
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
rawConfig = yaml.load(fileContents);
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
|
||||
const baseDomain = rawConfig.app.base_domain;
|
||||
const certResolver = rawConfig.traefik.cert_resolver;
|
||||
|
||||
@@ -22,9 +22,8 @@ export default async function migration() {
|
||||
}
|
||||
|
||||
// Read and parse the YAML file
|
||||
let rawConfig: any;
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
rawConfig = yaml.load(fileContents);
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
|
||||
// Validate the structure
|
||||
if (!rawConfig.app || !rawConfig.app.base_url) {
|
||||
|
||||
@@ -22,9 +22,8 @@ export default async function migration() {
|
||||
}
|
||||
|
||||
// Read and parse the YAML file
|
||||
let rawConfig: any;
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
rawConfig = yaml.load(fileContents);
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
|
||||
// Validate the structure
|
||||
if (!rawConfig.gerbil) {
|
||||
|
||||
@@ -25,9 +25,8 @@ export default async function migration() {
|
||||
}
|
||||
|
||||
// Read and parse the YAML file
|
||||
let rawConfig: any;
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
rawConfig = yaml.load(fileContents);
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
|
||||
// Validate the structure
|
||||
if (!rawConfig.server) {
|
||||
|
||||
@@ -23,9 +23,8 @@ export default async function migration() {
|
||||
}
|
||||
|
||||
// Read and parse the YAML file
|
||||
let rawConfig: any;
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
rawConfig = yaml.load(fileContents);
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
|
||||
// Validate the structure
|
||||
if (!rawConfig.server) {
|
||||
|
||||
@@ -58,9 +58,8 @@ export default async function migration() {
|
||||
}
|
||||
|
||||
// Read and parse the YAML file
|
||||
let rawConfig: any;
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
rawConfig = yaml.load(fileContents);
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
|
||||
rawConfig.server.resource_session_request_param =
|
||||
"p_session_request";
|
||||
@@ -122,7 +121,7 @@ export default async function migration() {
|
||||
const traefikFileContents = fs.readFileSync(traefikPath, "utf8");
|
||||
const traefikConfig = yaml.load(traefikFileContents) as any;
|
||||
|
||||
let parsedConfig: any = schema.safeParse(traefikConfig);
|
||||
const parsedConfig: any = schema.safeParse(traefikConfig);
|
||||
|
||||
if (parsedConfig.success) {
|
||||
// Ensure websecure entrypoint exists
|
||||
@@ -179,7 +178,7 @@ export default async function migration() {
|
||||
const traefikFileContents = fs.readFileSync(traefikPath, "utf8");
|
||||
const traefikConfig = yaml.load(traefikFileContents) as any;
|
||||
|
||||
let parsedConfig: any = schema.safeParse(traefikConfig);
|
||||
const parsedConfig: any = schema.safeParse(traefikConfig);
|
||||
|
||||
if (parsedConfig.success) {
|
||||
// delete permanent from redirect-to-https middleware
|
||||
|
||||
@@ -43,9 +43,8 @@ export default async function migration() {
|
||||
}
|
||||
|
||||
// Read and parse the YAML file
|
||||
let rawConfig: any;
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
rawConfig = yaml.load(fileContents);
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
|
||||
if (!rawConfig.flags) {
|
||||
rawConfig.flags = {};
|
||||
|
||||
@@ -177,7 +177,7 @@ export default async function migration() {
|
||||
}
|
||||
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
let rawConfig: any = yaml.load(fileContents);
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
|
||||
if (!rawConfig.server.secret) {
|
||||
rawConfig.server.secret = generateIdFromEntropySize(32);
|
||||
|
||||
@@ -44,9 +44,8 @@ export default async function migration() {
|
||||
}
|
||||
|
||||
// Read and parse the YAML file
|
||||
let rawConfig: any;
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
rawConfig = yaml.load(fileContents);
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
|
||||
if (rawConfig.cors?.headers) {
|
||||
const headers = JSON.parse(
|
||||
|
||||
@@ -45,9 +45,8 @@ export default async function migration() {
|
||||
}
|
||||
|
||||
// Read and parse the YAML file
|
||||
let rawConfig: any;
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
rawConfig = yaml.load(fileContents);
|
||||
const rawConfig: any = yaml.load(fileContents);
|
||||
|
||||
if (rawConfig.server?.trust_proxy) {
|
||||
rawConfig.server.trust_proxy = 1;
|
||||
|
||||
Reference in New Issue
Block a user