Skip to content

Commit

Permalink
update linting formate
Browse files Browse the repository at this point in the history
  • Loading branch information
amitamrutiya committed Feb 12, 2024
1 parent 5464886 commit c7bb956
Show file tree
Hide file tree
Showing 73 changed files with 1,851 additions and 1,845 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/*.js
test.js
frontend/dist/*.js
frontend/dist
26 changes: 14 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,42 @@ module.exports = {
es2021: true,
},
extends: [
'standard',
'plugin:react/recommended',
"standard",
"plugin:react/recommended",
],
overrides: [
{
env: {
node: true,
},
files: [
'.eslintrc.{js,cjs}',
".eslintrc.{js,cjs}",
],
parserOptions: {
sourceType: 'script',
sourceType: "script",
},
},
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true, // This is the key line - it tells ESLint to expect JSX syntax
},
},
plugins: [
'react',
"react",
],
rules: {
'comma-dangle': ['error', 'always-multiline'], // Enforces trailing commas for multiline statements
'react/jsx-filename-extension': ['warn', { extensions: ['.js', '.jsx'] }], // Enforces .jsx extension for JSX files
'react/react-in-jsx-scope': 'off', // Prevents React to be incorrectly marked as unused
"comma-dangle": ["error", "always-multiline"], // Enforces trailing commas for multiline statements
"react/jsx-filename-extension": ["warn", { extensions: [".js", ".jsx"] }], // Enforces .jsx extension for JSX files
"react/react-in-jsx-scope": "off", // Prevents React to be incorrectly marked as unused
quotes: ["error", "double"],
semi: ["error", "always"],
},
settings: {
react: {
version: 'detect', // Automatically picks the version you have installed.
version: "detect", // Automatically picks the version you have installed.
},
},
}
};
6 changes: 3 additions & 3 deletions backend/config/cloudinary.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { v2 as cloudinary } from 'cloudinary'
import { v2 as cloudinary } from "cloudinary";

export function cloudinaryConnect () {
try {
cloudinary.config({
cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
api_key: process.env.CLOUDINARY_API_KEY,
api_secret: process.env.CLOUDINARY_API_SECRET,
})
});
} catch (error) {
console.log('Error in connecting to cloudinary: ' + error)
console.log("Error in connecting to cloudinary: " + error);
}
}
14 changes: 7 additions & 7 deletions backend/config/database.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import mongoose from 'mongoose'
import mongoose from "mongoose";

const connectDB = async () => {
try {
await mongoose.connect(process.env.MONGODB_URL)
console.log('\n MongoDB connected with ' + process.env.MONGODB_URL + '\n')
await mongoose.connect(process.env.MONGODB_URL);
console.log("\n MongoDB connected");
} catch (error) {
console.log('MongoDB connection FAILED', error)
process.exit(1)
console.log("MongoDB connection FAILED", error);
process.exit(1);
}
}
};

export default connectDB
export default connectDB;
6 changes: 3 additions & 3 deletions backend/config/razorpay.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Razorpay from 'razorpay'
import Razorpay from "razorpay";

const instance = new Razorpay({
key_id: process.env.RAZORPAY_KEY_ID,
key_secret: process.env.RAZORPAY_KEY_SECRET,
})
});

export default instance
export default instance;
Loading

0 comments on commit c7bb956

Please sign in to comment.