vscode-standard icon indicating copy to clipboard operation
vscode-standard copied to clipboard

Autofix on save not working

Open Eomm opened this issue 4 years ago • 2 comments

What version of this package are you using?

I'm using VSCODE 1.60.2, and this plugin v2.0.0. I have tried 1.5.1 and 1.5.0 as well but it not solve.

What operating system, Node.js, and npm version?

Win10, Node.js 16.x and npm 7.21.0

What happened?

The autofixOnSave does not fix the file on saving anymore. It is a week or so.

My settings are:

"standard.enable": true,
"standard.run": "onSave",
"standard.enableGlobally": false,
"standard.usePackageJson": true,
"standard.trace.server": "verbose",
"standard.autoFix": true,
"standard.autoFixOnSave": true,

The standard version saved on the devDepencancies is the last one "^16.0.3" (I have tried the v15 without success)

What did you expect to happen?

The auto fix applies the fix on the js file

Are you willing to submit a pull request to fix this bug?

Debugging a bit:

  • The command standard.applyAutoFix works as expected
  • Logging every ExecuteCommandRequest it seems that the client cannot trigger this event to autofix the file.

With the actual Launch Client script, I'm unable to see the changes on the client in the VSCode debug instance. If you can help me debug it, I may work on it.

Eomm avatar Oct 02 '21 15:10 Eomm

Thanks for your report! I will try to reproduce and investigate when I have some time.

theoludwig avatar Oct 03 '21 09:10 theoludwig

As update, it works only if I add a root .eslintrc file:

{
  "extends": "standard"
}

Eomm avatar Nov 07 '21 15:11 Eomm