ben-eb / gulp-svgmin

Minify SVG files with gulp.
MIT License
341 stars 35 forks source link

Fix prettier config to match xo config #110

Closed JohnAlbin closed 3 years ago

JohnAlbin commented 3 years ago

I'm not sure how this happened but the Prettier config does not match the expect xo linting.

Steps to reproduce:

  1. Do a fresh git clone of gulp-svgmin
  2. npm install
  3. npm test — All tests should pass, including xo linting.
  4. npx prettier --write src — Prettier uses the config from package.json and re-writes files.
  5. git status — Shows multiple files have formatting changes.
  6. npm test — Tests fail because xo linting is failing.
  7. npx xo --fix; git status — Shows that multiple files were re-written back to what they were when git cloned.

I've updated the prettier config so that IDEs that use Prettier won't break tests.

P.S. I don't like the Prettier options this project is using, but this isn't my project. ¯\_(ツ)_/¯

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling d8c7a09571f958178724609e5f8b63ba03efb31f on JohnAlbin:prettier-config into 2067c1a581e58747244192ad7a9c015f969c6ad5 on ben-eb:master.

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling ee74a91a2e5aa88dcc0b4237a56f7a49b2699f4f on JohnAlbin:prettier-config into 2067c1a581e58747244192ad7a9c015f969c6ad5 on ben-eb:master.

JohnAlbin commented 3 years ago

This might be due to a bug in xo since its README says:

The Prettier options will be read from the Prettier config

But… then why is it writing files differently than Prettier?