idahogurl / vs-code-prettier-eslint

A Visual Studio Code Extension to format JavaScript and TypeScript code using the prettier-eslint package.
MIT License
185 stars 46 forks source link

Format on save doesn't respect ignore patterns #126

Closed aminomancer closed 1 year ago

aminomancer commented 1 year ago

STR

  1. Open a project with the extension's dependencies fulfilled
  2. Make a .js file that somehow violates the linting rules
  3. Add the .js file to .eslintignore or ignorePatterns
  4. Add it to .prettierignore
  5. Confirm the file is not formatted by ESLint or Prettier individually
  6. Confirm the file is not formatted by running "Format Document" in VS Code
  7. Save the file

Expected

File is saved without formatting

Actual

File is saved after formatting

aminomancer commented 1 year ago

Actually I think this is unrelated to the extension. The only thing it's doing on save is removing whitespace and adding a final linebreak at the end of the doc. So it doesn't seem to be running prettier or eslint. I think it's probably EditorConfig.