microsoft / vscode-eslint

VSCode extension to integrate eslint into VSCode
MIT License
1.73k stars 334 forks source link

ESlint activated for Workspace only not recognised #1077

Closed rowild closed 4 years ago

rowild commented 4 years ago

I have eslint enabledin my Workspace only:

Screen Shot 2020-09-23 at 17 07 44

but it does not seem to be recognised at all, since I get error message in the console saying that I should install it:

Failed to load the ESLint library for the document /[path]/dev.aimeos-laravel.test/ext/ai-admin-jqadm/admin/jqadm/themes/vue-components.js

To use ESLint please install eslint by running npm install eslint in the workspace folder dev.aimeos-laravel.test
or globally using 'npm install -g eslint'. You need to reopen the workspace after installing eslint.

If you are using yarn or pnpm instead of npm set the setting `eslint.packageManager` to either `yarn` or `pnpm`
Alternatively you can disable ESLint for the workspace folder dev.aimeos-laravel.test by executing the 'Disable ESLint' command.

Not sure if this is a bug? Or am I conffiguring sth wrongly? This is what I have in my workspace settings (NOT settings!):

    "eslint.alwaysShowStatus": true,
    "eslint.codeAction.disableRuleComment": {},
    "eslint.enable": true,
    "eslint.format.enable": true,
    "eslint.lintTask.enable": true,
    "eslint.options": {
        "space-before-function-paren": ["warn", {
            "anonymous": "never",
            "named": "never",
            "asyncArrow": "always"
        }],
    },
    "eslint.validate": ["javascript", "javascriptreact"],
[...]
    "[javascript]": {
        "editor.insertSpaces": false,
        "editor.tabSize": 2,
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.fixAll.eslint": true,
        },
    },
dbaeumer commented 4 years ago

@rowild does the validation happen correctly when you use eslint in the terminal. If this is the case can you please provide me with a GitHub repository I can clone that demos what you are experiencing.

rowild commented 4 years ago

HI @dbaeumer ! Thank you for your response!

Sorry for having wasted your time! My eslint setup was incomplete (no .eslintrc, no dependency installations). Following your install instructions again made everything work.

Closing this issue.

dbaeumer commented 3 years ago

No problem. Thanks for getting back.