From 5dfec610c2a1cf12b58e5e1ae564529c148b633b Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 31 Mar 2023 15:04:27 +0000 Subject: [PATCH] style: Format code with prettier and standardjs Format code with prettier and standardjs This commit fixes the style issues introduced in 546896a according to the output from prettier and standardjs. Details: https://deepsource.io/gh/aryabasu17/Own-Website/transform/f567bf70-0d38-4fe7-8445-c3f91ae6103c/ --- .vscode/launch.json | 30 +++++++++---------- .vscode/settings.json | 8 ++--- jsconfig.json | 23 +++++++------- src/Js/index.js | 70 +++++++++++++++++++++---------------------- 4 files changed, 63 insertions(+), 68 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 12f4fc2..1144c38 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,16 +1,16 @@ { - "configurations": [ - { - "type": "chrome", - "name": "http://127.0.0.1:8000/src/index.html", - "request": "launch", - "url": "http://127.0.0.1:8000/src/index.html" - }, - { - "type": "chrome", - "name": "http://127.0.0.1:8000/index.html", - "request": "launch", - "url": "http://127.0.0.1:8000/index.html" - } - ] -} \ No newline at end of file + "configurations": [ + { + "type": "chrome", + "name": "http://127.0.0.1:8000/src/index.html", + "request": "launch", + "url": "http://127.0.0.1:8000/src/index.html" + }, + { + "type": "chrome", + "name": "http://127.0.0.1:8000/index.html", + "request": "launch", + "url": "http://127.0.0.1:8000/index.html" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 593a18b..1377747 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "livePreview.defaultPreviewPath": "/index.html", - "typescript.suggestionActions.enabled": false, - "javascript.suggestionActions.enabled": false, -} \ No newline at end of file + "livePreview.defaultPreviewPath": "/index.html", + "typescript.suggestionActions.enabled": false, + "javascript.suggestionActions.enabled": false +} diff --git a/jsconfig.json b/jsconfig.json index 458cf9b..88c3237 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -1,14 +1,11 @@ { - "compilerOptions": { - "module": "ESNext", - "moduleResolution": "Node", - "target": "ES2020", - "jsx": "react", - "strictNullChecks": true, - "strictFunctionTypes": true - }, - "exclude": [ - "node_modules", - "**/node_modules/*" - ] -} \ No newline at end of file + "compilerOptions": { + "module": "ESNext", + "moduleResolution": "Node", + "target": "ES2020", + "jsx": "react", + "strictNullChecks": true, + "strictFunctionTypes": true + }, + "exclude": ["node_modules", "**/node_modules/*"] +} diff --git a/src/Js/index.js b/src/Js/index.js index 1d0c162..2c04c75 100644 --- a/src/Js/index.js +++ b/src/Js/index.js @@ -1,50 +1,48 @@ -const express = require("express"); -const dotenv = require("dotenv").config(); -const port = process.env.PORT || 5000; +const express = require('express') +const dotenv = require('dotenv').config() +const port = process.env.PORT || 5000 // const port = "https://localhost:3000" -const app = express(); -const mongoose = require("mongoose"); +const app = express() +const mongoose = require('mongoose') mongoose.connect( - "mongodb+srv://riju:@cluster1.doybfcn.mongodb.net/test", { - useNewUrlParser: true, - useUnifiedTopology: true, -}, (err) => { + 'mongodb+srv://riju:@cluster1.doybfcn.mongodb.net/test', + { + useNewUrlParser: true, + useUnifiedTopology: true + }, + (err) => { if (err) { - console.log("Error in connecting to database"); + console.log('Error in connecting to database') } else { - console.log("Connected to database"); + console.log('Connected to database') } } -); +) - -app.listen(port, () => console.log(`Server started on port ${port}`)); +app.listen(port, () => console.log(`Server started on port ${port}`)) // Path: src\Js\index.js -var person = [ - { - name: "John", - age: 31, - }, - { - name: "Riju", - age: 30, - }, - { - name: "Raja", - age: 29, - } - -]; -person = JSON.stringify(person); -person = JSON.parse(person); - -console.log(person.age); +let person = [ + { + name: 'John', + age: 31 + }, + { + name: 'Riju', + age: 30 + }, + { + name: 'Raja', + age: 29 + } +] +person = JSON.stringify(person) +person = JSON.parse(person) -async function getdata() { - let result = await client.connect() - +console.log(person.age) +async function getdata () { + const result = await client.connect() }