question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ESLint not working no matter how i try to fix

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
vscodebot[bot]commented, Oct 24, 2019

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!

0reactions
dbaeumercommented, Oct 17, 2019

@bacsonvv I can’t reproduce this using the provided repository. I get

[Info  - 11:53:35 AM] ESLint server running in node v12.4.0
[Info  - 11:53:35 AM] ESLint server is running.
[Info  - 11:53:40 AM] ESLint library loaded from: c:\Users\dirkb\Projects\mseng\VSCode\Playgrounds\bugs\eslint\eslintissue\starter\node_modules\eslint\lib\api.js
[Warn  - 11:53:40 AM] 
No ESLint configuration (e.g .eslintrc) found for file: c:\Users\dirkb\Projects\mseng\VSCode\Playgrounds\bugs\eslint\eslintissue\starter\server.js
File will not be validated. Consider running 'eslint --init' in the workspace folder eslintissue
Alternatively you can disable ESLint by executing the 'Disable ESLint' command.

Can you please make the example self contained.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint not working in VS Code? - Stack Overflow
To verify, press Ctrl + Shift + U in VSCode to open the Output panel after opening a JavaScript file with a known...
Read more >
ESLint not working in VSCode? Help build a troubleshooting ...
Open the command palette by pressing Ctrl / Cmd + Shift + P and select 'ESLint: Show Output Channel '. If ESLint throws...
Read more >
Find and fix problems in your JavaScript code - ESLint ...
Many problems ESLint finds can be automatically fixed. ESLint fixes are syntax-aware so you won't experience errors introduced by traditional find-and-replace ...
Read more >
VS Code ESLint extension - Visual Studio Marketplace
Extension for Visual Studio Code - Integrates ESLint JavaScript into VS Code.
Read more >
How To Enable Linting on Save with Visual Studio Code and ...
Trying to manually run ESLint: Fix all auto-fixable Problems periodically is not very reliable. However, having lint rules run every time ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found