ESLint not working no matter how i try to fix
See original GitHub issueI’m new to Node and JS. I’m following a course and trying to use ESLint and stuffs but ran into problems that i couldn’t fix.
ESLint not working at all even i set up and config all the things just like my mentor showed me.
My eslintrc:
{ "extends": ["eslint:recommended", "airbnb", "prettier", "plugin:node/recommended"], "plugins": ["prettier"], "rules": { "prettier/prettier": "error", "spaced-comment": "off", "no-console": "warn", "consistent-return": "off", "func-names": "off", "object-shorthand": "off", "no-process-exit": "off", "no-param-reassign": "off", "no-return-await": "off", "no-underscore-dangle": "off", "class-methods-use-this": "off", "prefer-destructuring": ["error", { "object": true, "array": false }], "no-unused-vars": ["error", { "argsIgnorePattern": "req|res|next|val" }] } }
My packet.json:
{ "name": "natours", "version": "1.0.0", "description": "Learning node, express and mongoDB", "main": "app.js", "scripts": { "start:dev": "nodemon server.js", "start:prod": "NODE_ENV=production nodemon server.js" }, "author": "Bac Son", "license": "ISC", "dependencies": { "dotenv": "^8.1.0", "express": "^4.17.1", "morgan": "^1.9.1" }, "devDependencies": { "eslint": "^6.5.1", "eslint-config-airbnb": "^18.0.1", "eslint-config-prettier": "^6.3.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.1.1", "eslint-plugin-react": "^7.15.1", "prettier": "^1.18.2" } }
And I also get this error while I’m trying to fix the problems by myself: “Failed to load plugin ‘node’ declared in ‘starter.eslintrc.json’: Cannot find module ‘eslint-plugin-node’”
Very appreciate any help
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!
@bacsonvv I can’t reproduce this using the provided repository. I get
Can you please make the example self contained.