Skip to content

Commit

Permalink
feat: eslint flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
rubiin committed Sep 27, 2023
1 parent d088411 commit fce475f
Show file tree
Hide file tree
Showing 93 changed files with 2,221 additions and 1,983 deletions.
41 changes: 41 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import rubiin from "@rubiin/eslint-config";

export default rubiin({
stylistic: true, // enable stylistic rules
typescript: {
tsconfigPath: "tsconfig.json", // path to tsconfig.json
},
},
{
rules: {
"ts/no-floating-promises": "off",
"ts/no-extraneous-class": "off",
"ts/unbound-method": "off",
"ts/require-await": "off", // optimize this
"ts/no-unsafe-assignment": "off", // optimize this
"ts/no-unsafe-member-access": "off", // optimize this
"unicorn/prefer-top-level-await": "off",
"ts/no-misused-promises": [
"error",
{
checksVoidReturn: false,
},
],
"unicorn/prevent-abbreviations": [
"error",
{
ignore: [
"\\.e2e*",
"\\.spec*",
"\\.decorator*",
"\\*idx*",
],
allowList: {
ProcessEnv: true,
UUIDParam: true,
},
},
],
},
},
);
24 changes: 10 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
],
"scripts": {
"build": "nest build",
"lint": "eslint '{src,test}/**/*.ts' --cache",
"lint:fix": "eslint '{src,test}/**/*.ts' --cache --fix",
"lint": "ESLINT_USE_FLAT_CONFIG=true eslint -c eslint.config.mjs '{src,test}/**/*.ts' --cache",
"lint:fix": "ESLINT_USE_FLAT_CONFIG=true eslint -c eslint.config.mjs '{src,test}/**/*.ts' --cache --fix",
"orm": "npx mikro-orm",
"prebuild": "rimraf dist",
"sample": "cd env; npx sample-env --env .env.dev",
Expand All @@ -52,7 +52,7 @@
"test:e2e": "jest --config ./test/jest-e2e.json --runInBand --forceExit"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.418.0",
"@aws-sdk/client-s3": "^3.420.0",
"@aws-sdk/client-ses": "^3.418.0",
"@casl/ability": "^6.5.0",
"@golevelup/nestjs-rabbitmq": "^4.0.0",
Expand Down Expand Up @@ -82,8 +82,8 @@
"@nestjs/websockets": "^10.2.6",
"@ntegral/nestjs-sentry": "^4.0.0",
"@paralleldrive/cuid2": "^2.2.2",
"@sentry/hub": "^7.71.0",
"@sentry/node": "^7.71.0",
"@sentry/hub": "^7.72.0",
"@sentry/node": "^7.72.0",
"@socket.io/redis-adapter": "^8.2.1",
"@supercharge/request-ip": "^1.2.0",
"argon2": "^0.31.1",
Expand Down Expand Up @@ -146,19 +146,19 @@
"@nestjs/cli": "10.1.18",
"@nestjs/schematics": "10.0.2",
"@nestjs/testing": "10.2.6",
"@rubiin/eslint-config-ts": "^1.5.1",
"@rubiin/eslint-config": "^1.8.2",
"@rubiin/tsconfig": "^1.1.0",
"@sentry/types": "^7.71.0",
"@sentry/types": "^7.72.0",
"@side/jest-runtime": "^1.1.0",
"@swc/core": "^1.3.89",
"@swc/core": "^1.3.90",
"@swc/jest": "^0.2.29",
"@total-typescript/ts-reset": "^0.5.1",
"@types/cache-manager": "^4.0.3",
"@types/cache-manager-redis-store": "^2.0.2",
"@types/compression": "^1.7.3",
"@types/jest": "^29.5.5",
"@types/mime-types": "^2.1.1",
"@types/multer": "^1.4.7",
"@types/mime-types": "^2.1.2",
"@types/multer": "^1.4.8",
"@types/node": "^20.7.0",
"@types/nodemailer": "^6.4.11",
"@types/passport": "^1.0.13",
Expand All @@ -172,13 +172,9 @@
"@types/supertest": "2.0.13",
"@types/swagger-stats": "^0.95.9",
"@types/swagger-ui-express": "^4.1.4",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"cross-env": "^7.0.3",
"cz-conventional-changelog": "3.3.0",
"eslint": "^8.50.0",
"eslint-define-config": "^1.23.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint_d": "^12.2.1",
"husky": "^8.0.3",
"jest": "29.7.0",
Expand Down
Loading

0 comments on commit fce475f

Please sign in to comment.