Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint in VSCode not fixing on save Version - 9.17.0 #1962

Open
Caetas123 opened this issue Dec 28, 2024 · 5 comments
Open

ESLint in VSCode not fixing on save Version - 9.17.0 #1962

Caetas123 opened this issue Dec 28, 2024 · 5 comments
Labels
info-needed Issue requires more information from poster

Comments

@Caetas123
Copy link

The error is that it does not automatically correct errors after saving the file, and when I change "explicit" to true it gives the error:

                     Incorrect type. Expected "string".

And if I close Vs Code with true it automatically goes to "explicit"

My settings.json:
{
"git.autofetch": true,
"liveServer.settings.donotShowInfoMsg": true,
"github.copilot.editor.enableAutoCompletions": false,
"files.autoSave": "afterDelay",
"git.openRepositoryInParentFolders": "always",
"diffEditor.hideUnchangedRegions.enabled": true,
"git.confirmSync": false,
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "GitHub Dark Dimmed",
"settingsSync.ignoredSettings": [
"-php.validate.executablePath"
],
"chat.editing.alwaysSaveWithGeneratedChanges": true,
"code-runner.runInTerminal": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true // Error- incorrect type. Expected "string"
}
}

My eslint.config.mjs:
import globals from "globals";
import pluginJs from "@eslint/js";

/** @type {import('eslint').Linter.Config[]} /
export default [
{
files: ["**/
.{js,mjs,cjs}"],
languageOptions: {
globals: globals.node,
ecmaVersion: "latest",
sourceType: "module"
},
rules: {
...pluginJs.configs.recommended.rules
}
}
];

@dbaeumer
Copy link
Member

dbaeumer commented Jan 6, 2025

@Caetas123 could you please provide me with a GitHub repository I can clone which contains a minimal setup that demos what you are seeing. This helps understanding the problem since errors like this a very version and config dependent.

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Jan 6, 2025
@Minori-ty
Copy link

the same problem

@dbaeumer
Copy link
Member

Do understand what is going on I need a GitHub repository I can clone with a minimal setup that demos it. @Minori-ty could you provide something like this?

@Minori-ty
Copy link

Do understand what is going on I need a GitHub repository I can clone with a minimal setup that demos it. @Minori-ty could you provide something like this?

Sorry, maybe I misunderstood. However, I encountered another problem where the ESLint version does not take effect.
#1971

@dbaeumer
Copy link
Member

Just commented on #1971

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants