mysticatea / eslint-plugin-node

Additional ESLint's rules for Node.js
MIT License
958 stars 166 forks source link

Getting no-extraneous imports issue while starting typescript project #359

Closed debasistripathy01 closed 3 weeks ago

debasistripathy01 commented 3 weeks ago

At first project was running fine even with the extraneous import issue. But now server is not starting because I added some code into eslint.json file with some modification in rules "rules": { "node/no-extraneous-import":[ "error", { "devDependencies": false, "optionalDependencies": false, "peerDependencies": false } ] }

typescipt_error

debasistripathy01 commented 3 weeks ago

Also I am facing issue with this error if everything else is okay with the eslint.json file. otherError_ts

debasistripathy01 commented 3 weeks ago

This is my package.json file contents


  "name": "sociopub",
  "version": "1.0.0",
  "main": "src/index.ts",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "dev": "nodemon src/index.ts",
    "start": "npm run build & node build/index.js",
    "build": "rimraf ./build & tsc",
    "lint": "gts lint",
    "clean": "gts clean",
    "compile": "tsc",
    "fix": "gts fix",
    "prepare": "npm.cmd run compile",
    "pretest": "npm.cmd run compile",
    "posttest": "npm.cmd run lint"
  },
  "keywords": [],
  "author": "Debasis Tripathy",
  "license": "ISC",
  "description": "",
  "devDependencies": {
    "@aws-sdk/types": "^3.577.0",
    "@types/axios": "^0.14.0",
    "@types/chalk": "^2.2.0",
    "@types/cors": "^2.8.17",
    "@types/express": "^4.17.21",
    "@types/express-session": "^1.18.0",
    "@types/express-validator": "^3.0.0",
    "@types/jsonwebtoken": "^9.0.6",
    "@types/mongoose": "^5.11.97",
    "@types/morgan": "^1.9.9",
    "@types/multer": "^1.4.11",
    "@types/node": "20.11.5",
    "@types/nodemailer": "^6.4.15",
    "@types/otp-generator": "^4.0.2",
    "@types/qs": "^6.9.15",
    "@types/swagger-jsdoc": "^6.0.4",
    "@types/swagger-ui-express": "^4.1.6",
    "axios": "^1.7.2",
    "cors": "^2.8.5",
    "gts": "^5.3.0",
    "morgan": "^1.10.0",
    "otp-generator": "^4.0.1",
    "qs": "^6.12.1",
    "rimraf": "^5.0.7",
    "ts-node": "^10.9.2",
    "typescript": "^5.4.5"
  },
  "dependencies": {
    "@sendgrid/mail": "^8.1.3",
    "@types/bcrypt": "^5.0.2",
    "@types/dotenv": "^8.2.0",
    "@types/helmet": "^4.0.0",
    "@types/passport": "^1.0.16",
    "@types/passport-facebook": "^3.0.3",
    "@types/passport-google-oauth20": "^2.0.16",
    "aws-sdk": "^2.1631.0",
    "bcrypt": "^5.1.1",
    "cloudinary": "^2.2.0",
    "dotenv": "^16.4.5",
    "express": "^4.19.2",
    "express-session": "^1.18.0",
    "express-validator": "^7.1.0",
    "helmet": "^7.1.0",
    "jsonwebtoken": "^9.0.2",
    "msg91": "^2.2.4",
    "multer": "^1.4.5-lts.1",
    "nodemailer": "^6.9.13",
    "nodemon": "^3.1.2",
    "passport": "^0.7.0",
    "swagger-jsdoc": "^6.2.8",
    "swagger-ui-express": "^5.0.0"
  }
}```
scagood commented 3 weeks ago

Hi, can you try the eslint-community fork over at https://github.com/eslint-community/eslint-plugin-n

If you have any issues, we'd be happy to help there!

debasistripathy01 commented 3 weeks ago

Thank you for letting me know. I'm closing this issue.