From db2e4f4018898db537f5a670a35183885671f955 Mon Sep 17 00:00:00 2001 From: Rares Mardare <40542072+teodosii@users.noreply.github.com> Date: Mon, 9 Jan 2023 17:50:55 +0200 Subject: [PATCH] Update prettier@2.8.2 (#1112) # What this PR does Updated prettier to `2.8.2` to fix linter issue on CI --- .pre-commit-config.yaml | 14 ++++++++++---- grafana-plugin/package.json | 2 +- .../src/models/timezone/timezone.types.ts | 6 +++--- grafana-plugin/yarn.lock | 7 ++++++- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5f384934..464bbf88 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,8 @@ repos: - id: isort name: isort - pd-migrator files: ^tools/pagerduty-migrator - args: [--settings-file=tools/pagerduty-migrator/.isort.cfg, --filter-files] + args: + [--settings-file=tools/pagerduty-migrator/.isort.cfg, --filter-files] - repo: https://github.com/psf/black rev: 22.3.0 @@ -33,7 +34,12 @@ repos: files: ^tools/pagerduty-migrator # Make sure config is compatible with black # https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length - args: [--max-line-length=88, "--select=C,E,F,W,B,B950", "--extend-ignore=E203,E501"] + args: + [ + --max-line-length=88, + "--select=C,E,F,W,B,B950", + "--extend-ignore=E203,E501", + ] - repo: https://github.com/pre-commit/mirrors-eslint rev: v8.25.0 @@ -56,12 +62,12 @@ repos: types_or: [css, javascript, jsx, ts, tsx] files: ^grafana-plugin/src additional_dependencies: - - prettier@^2.7.1 + - prettier@2.8.2 - id: prettier name: prettier - json types_or: [json] additional_dependencies: - - prettier@^2.7.1 + - prettier@2.8.2 - repo: https://github.com/thibaudcolas/pre-commit-stylelint rev: v13.13.1 diff --git a/grafana-plugin/package.json b/grafana-plugin/package.json index ee4efd6f..2cb20dbe 100644 --- a/grafana-plugin/package.json +++ b/grafana-plugin/package.json @@ -115,7 +115,7 @@ "eslint-plugin-import": "^2.25.4", "mobx": "5.13.0", "mobx-react": "6.1.1", - "prettier": "^2.7.1", + "prettier": "^2.8.2", "rc-table": "^7.17.1", "react-copy-to-clipboard": "^5.0.2", "react-draggable": "^4.4.5", diff --git a/grafana-plugin/src/models/timezone/timezone.types.ts b/grafana-plugin/src/models/timezone/timezone.types.ts index 6ed40261..2b62579b 100644 --- a/grafana-plugin/src/models/timezone/timezone.types.ts +++ b/grafana-plugin/src/models/timezone/timezone.types.ts @@ -1,4 +1,4 @@ -const tzs = [ +const tzs: string[] = [ 'Africa/Abidjan', 'Africa/Accra', 'Africa/Addis_Ababa', @@ -591,6 +591,6 @@ const tzs = [ 'W-SU', 'WET', 'Zulu', -] as const; +]; -export type Timezone = typeof tzs[number]; +export type Timezone = (typeof tzs)[number]; diff --git a/grafana-plugin/yarn.lock b/grafana-plugin/yarn.lock index 7d7cc950..6ef39fdc 100644 --- a/grafana-plugin/yarn.lock +++ b/grafana-plugin/yarn.lock @@ -10913,11 +10913,16 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@2.7.1, prettier@^2.7.1: +prettier@2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== +prettier@^2.8.2: + version "2.8.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.2.tgz#c4ea1b5b454d7c4b59966db2e06ed7eec5dfd160" + integrity sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw== + pretty-error@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-4.0.0.tgz#90a703f46dd7234adb46d0f84823e9d1cb8f10d6"