Skip to content

Commit

Permalink
Merge pull request #1353 from akhilmhdh/feat/new-backend-lint
Browse files Browse the repository at this point in the history
feat: fixed eslint and resolved all eslint issues
  • Loading branch information
maidul98 committed Jan 30, 2024
2 parents 7c4dd50 + bcbb49e commit 7bf1f47
Show file tree
Hide file tree
Showing 218 changed files with 2,107 additions and 4,403 deletions.
35 changes: 20 additions & 15 deletions backend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
/* eslint-env node */
module.exports = {
root: true,
env: {
browser: true,
es2021: true
es6: true,
node: true
},
extends: ["airbnb-base", "airbnb-typescript/base", "prettier"],
plugins: ["prettier", "simple-import-sort", "import"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"airbnb-base",
"airbnb-typescript/base",
"plugin:prettier/recommended",
"prettier"
],
plugins: ["@typescript-eslint", "simple-import-sort", "import"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
project: true,
sourceType: "module",
project: "./tsconfig.json",
tsconfigRootDir: __dirname
},
root: true,
rules: {
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
"no-void": "off",
"consistent-return": "off", // my style
"import/order": "off", // for simple-import-order
"import/prefer-default-export": "off", // why
"no-restricted-syntax": "off",
// importing rules
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"simple-import-sort/exports": "error",
"simple-import-sort/imports": [
"warn",
{
Expand All @@ -45,12 +57,5 @@ module.exports = {
]
}
]
},
settings: {
"import/resolver": {
typescript: {
project: ["./tsconfig.json"]
}
}
}
};
4 changes: 2 additions & 2 deletions backend/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"singleQuote": false,
"printWidth": 100,
"printWidth": 120,
"trailingComma": "none",
"tabWidth": 2,
"semi": true
}
}
117 changes: 70 additions & 47 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@
"@types/picomatch": "^2.3.3",
"@types/prompt-sync": "^4.2.3",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
Expand Down Expand Up @@ -83,6 +79,8 @@
"@octokit/webhooks-types": "^7.3.1",
"@serdnam/pino-cloudwatch-transport": "^1.0.4",
"@sindresorhus/slugify": "^2.2.1",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"@ucast/mongo2js": "^1.3.4",
"ajv": "^8.12.0",
"argon2": "^0.31.2",
Expand All @@ -92,6 +90,8 @@
"bcrypt": "^5.1.1",
"bullmq": "^5.1.1",
"dotenv": "^16.3.1",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"fastify": "^4.24.3",
"fastify-plugin": "^4.5.1",
Expand Down
7 changes: 1 addition & 6 deletions backend/src/@types/fastify-zod.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
FastifyInstance,
RawReplyDefaultExpression,
RawRequestDefaultExpression,
RawServerDefault
} from "fastify";
import { FastifyInstance, RawReplyDefaultExpression, RawRequestDefaultExpression, RawServerDefault } from "fastify";
import { Logger } from "pino";

import { ZodTypeProvider } from "@app/server/plugins/fastify-zod";
Expand Down
Loading

0 comments on commit 7bf1f47

Please sign in to comment.