rollbar / rollbar.js

Error tracking and logging from Javascript to Rollbar
https://docs.rollbar.com/docs/javascript
MIT License
571 stars 213 forks source link

Integrate prettier to the project and ci and prettify project #1133

Closed matux closed 7 months ago

matux commented 7 months ago

Description of the change

This PR enables formatting checks in the CI with prettier and formats the entire project, including library, examples, tests, config files, html and markdown.

The following HTML errors identified by prettier were fixed as well:

examples/error.html
[error] examples/error.html: SyntaxError: Unexpected closing tag "html". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (49:1)
[error]   47 |   <button id="throw-depp-stack-error" onclick="throwDeepStackError(0,20)">Throw deep stack Error</button>
[error]   48 |   <button id="throw-event-handler-error" onclick="throwEventHandlerError(0,20)">Throw event handler Error</button>
[error] > 49 | </html>
[error]      | ^^^^^^^
[error]   50 |
examples/include_custom_object.html
[error] examples/include_custom_object.html: SyntaxError: Opening tag "a" not terminated. (39:18)
[error]   37 |     <button onclick="window.myvariable = {foo: 'bar'}; Rollbar.info('test from include_custom_object.html');">Send test message, myvariable = {foo: 'bar'}</button>
[error]   38 |     <br><br>
[error] > 39 |     See results: <a href="https://rollbar.com/Rollbar/rollbar.js/items/420/?item_page=0&#instances">rollbar/rollbar.js#420</a>
[error]      |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error]   40 |
[error]   41 |   </body>
[error]   42 | </html>
examples/webpack/src/index.html
[error] examples/webpack/src/index.html: SyntaxError: Unexpected closing tag "html". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (22:1)
[error]   20 |   <button id="rollbar-info-with-extra" onclick="rollbarInfoWithExtra()">Log info and store JSON payload</button>
[error]   21 |   <button id="send-json" onclick="sendJson()">Send stored JSON</button>
[error] > 22 | </html>
[error]      | ^^^^^^^
[error]   23 |

Type of change

Checklists

Development

Code review