thlorenz / deoptigate

⏱️ Investigates v8/Node.js function deoptimizations.
https://nodesource.github.io/deoptigate-examples/xml2js/01_start/?selectedFileIdx=31&selectedLocation=157&includeAllSeverities=false&highlightCode=true&selectedTabIdx=1&selectedSummaryTabIdx=1
MIT License
1.16k stars 22 forks source link

Format source using prettier #16

Open andrewiggins opened 4 years ago

andrewiggins commented 4 years ago

Hi @thlorenz 👋

I noticed in another PR there were some comments about formatting. I'm also looking at contributing to deoptigate and thought contributing may be easier if this repo used Prettier, since it appears you use it some of your other repos. Personally I use semis 😬 so it would at least automatically remove them for me if I accidentally add them.

I copied the prettier config from one of your other repos to hopefully maintain consistency with your preferred style. It looks like most of the changes are line-length changes and moving commas from the beginning of the line to the end of the line.

No pressure though if you think Prettier isn't right for this repo. Just thought I'd ask. I can always manually remove my semis in future PRs 😄

thlorenz commented 4 years ago

In general I got no objection .. .let's merge the tests PR first though.

Also make sure that prettier + prettier fix each get a script in the package.json

andrewiggins commented 4 years ago

Yup, makes sense. You can use npm run lint and npm run lint:fix to run prettier -c and prettier --fix respectively.

andrewiggins commented 4 years ago

Rebased this PR on top of master to resolve conflicts in package.json, added npm run lint to the GitHub PR Action flow so PR builds fail if prettier wasn't run, and fixed the lint command to not lint the app/build directory.

I think this is ready for review/approval now!

thlorenz commented 3 years ago

Hey sorry for the late reply (again). Thanks for rebasing. Did you ensure this still runs as before? If so I'll just merge it when once you confirm.