Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Remove prettier plugin #22

Merged
merged 2 commits into from
Mar 3, 2022
Merged

Conversation

jackw
Copy link
Contributor

@jackw jackw commented Feb 25, 2022

The prettier plugin is quite slow, prettier recommend running it separately to linters. From profiling the Grafana linting command we can see it consumes ~73% of time taken to complete:

BEFORE:

Rule                                       | Time (ms) | Relative
:------------------------------------------|----------:|--------:
prettier/prettier                          | 47121.683 |    73.1%
jsdoc/check-alignment                      |  3051.863 |     4.7%
react/no-deprecated                        |  2758.311 |     4.3%
react/display-name                         |  2591.744 |     4.0%
react/no-direct-mutation-state             |  2117.436 |     3.3%
react/no-string-refs                       |  1578.806 |     2.4%
react/require-render-return                |  1235.619 |     1.9%
@typescript-eslint/naming-convention       |  1076.987 |     1.7%
no-redeclare                               |   320.645 |     0.5%
@typescript-eslint/type-annotation-spacing |   239.294 |     0.4%

AFTER:

Rule                                       | Time (ms) | Relative
:------------------------------------------|----------:|--------:
jsdoc/check-alignment                      |  3698.093 |    18.0%
react/no-deprecated                        |  3270.812 |    15.9%
react/display-name                         |  3054.202 |    14.9%
react/no-direct-mutation-state             |  2677.127 |    13.0%
react/no-string-refs                       |  1943.171 |     9.5%
react/require-render-return                |  1493.245 |     7.3%
@typescript-eslint/naming-convention       |  1104.044 |     5.4%
no-redeclare                               |   384.001 |     1.9%
jest/no-focused-tests                      |   319.223 |     1.6%
@typescript-eslint/type-annotation-spacing |   230.898 |     1.1%

@jackw jackw self-assigned this Feb 25, 2022
@jackw jackw marked this pull request as ready for review March 1, 2022 09:18
Copy link
Member

@zoltanbedi zoltanbedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@dprokop dprokop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I like ;)

@jackw jackw merged commit 36b6849 into master Mar 3, 2022
@jackw jackw deleted the jackw/remove-prettier-plugin branch March 3, 2022 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants