Skip to content

Commit 469ba55

Browse files
chore(deps): update dependency eslint-plugin-unicorn to v45 (#2839)
Co-authored-by: Matt Seddon <[email protected]>
1 parent a721c0a commit 469ba55

File tree

10 files changed

+40
-28
lines changed

10 files changed

+40
-28
lines changed

extension/src/experiments/columns/collect/util.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@ const mergeParentColumnByPath = (
7676
parentPath: string,
7777
label: string
7878
) => {
79-
if (!acc[path]) {
79+
if (acc[path]) {
80+
acc[path].hasChildren = true
81+
} else {
8082
acc[path] = {
8183
hasChildren: true,
8284
label,
8385
parentPath,
8486
path,
8587
type
8688
}
87-
} else {
88-
acc[path].hasChildren = true
8989
}
9090
}
9191

extension/src/experiments/model/quickPicks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const getItem = (experiment: Experiment, firstThreeColumnOrder: string[]) => ({
3333
15
3434
)
3535

36-
return value !== null ? `${truncatedKey}:${value}` : ''
36+
return value === null ? '' : `${truncatedKey}:${value}`
3737
})
3838
.filter(Boolean)
3939
.join(', '),

extension/src/experiments/model/tree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ export class ExperimentsTree
355355
path.slice(type.length + 1) || path,
356356
30
357357
)
358-
return value !== null ? `| ${truncatedKey} | ${value} |\n` : ''
358+
return value === null ? '' : `| ${truncatedKey} | ${value} |\n`
359359
})
360360
.join('')
361361

extension/src/experiments/model/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const getDataFromColumnPath = (
4646
return {
4747
splitUpPath,
4848
value:
49-
columnPath === 'Created' && typeof value === 'undefined'
49+
columnPath === 'Created' && value === 'undefined'
5050
? null
5151
: getStringifiedValue(value)
5252
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"eslint-plugin-sonarjs": "0.16.0",
5757
"eslint-plugin-sort-keys-fix": "1.1.2",
5858
"eslint-plugin-testing-library": "5.9.1",
59-
"eslint-plugin-unicorn": "44.0.2",
59+
"eslint-plugin-unicorn": "45.0.0",
6060
"husky": "8.0.2",
6161
"jest": "29.3.1",
6262
"lint-staged": "13.0.3",

webview/src/plots/components/GetStarted.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const AddPlots: React.FC<AddPlotsProps> = ({
2929
)}
3030
{!hasSelectedRevisions && (
3131
<StartButton
32-
appearance={!hasSelectedPlots ? 'secondary' : 'primary'}
32+
appearance={hasSelectedPlots ? 'primary' : 'secondary'}
3333
isNested={!hasSelectedPlots}
3434
onClick={() =>
3535
sendMessage({

webview/src/plots/components/templatePlots/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const add = (
1818
) => {
1919
const entries = [...section.entries]
2020
entries.splice(
21-
position !== undefined ? position : entries.length - 1,
21+
position === undefined ? entries.length - 1 : position,
2222
0,
2323
entry
2424
)

webview/src/stories/Plots.stories.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,10 @@ SmoothTemplate.args = {
241241
...templatePlotsFixture,
242242
plots: [
243243
{
244-
entries: [
245-
...templatePlotsFixture.plots[0].entries.map(plot => ({
246-
...plot,
247-
content: { ...smoothTemplatePlotContent }
248-
}))
249-
],
244+
entries: templatePlotsFixture.plots[0].entries.map(plot => ({
245+
...plot,
246+
content: { ...smoothTemplatePlotContent }
247+
})),
250248
group: TemplatePlotGroup.SINGLE_VIEW
251249
} as unknown as TemplatePlotSection
252250
]

webview/src/test/dragDrop.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ export const dragEnter = (
6060
draggedOver = idToNode(draggedOverId)
6161

6262
act(() => {
63-
if (direction !== DragEnterDirection.AUTO) {
63+
if (direction === DragEnterDirection.AUTO) {
64+
draggedOver?.dispatchEvent(createBubbledEvent('dragover'))
65+
} else {
6466
const left = 100
6567
const right = left + 100
6668
const top = 100
@@ -82,8 +84,6 @@ export const dragEnter = (
8284

8385
draggedOver?.dispatchEvent(dragOverEvent)
8486
jest.advanceTimersByTime(1)
85-
} else {
86-
draggedOver?.dispatchEvent(createBubbledEvent('dragover'))
8787
}
8888
})
8989

yarn.lock

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6849,10 +6849,10 @@ ci-info@^3.2.0:
68496849
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2"
68506850
integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==
68516851

6852-
ci-info@^3.4.0:
6853-
version "3.5.0"
6854-
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.5.0.tgz#bfac2a29263de4c829d806b1ab478e35091e171f"
6855-
integrity sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==
6852+
ci-info@^3.6.1:
6853+
version "3.7.0"
6854+
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.7.0.tgz#6d01b3696c59915b6ce057e4aa4adfc2fa25f5ef"
6855+
integrity sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog==
68566856

68576857
cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
68586858
version "1.0.4"
@@ -8965,24 +8965,26 @@ [email protected]:
89658965
dependencies:
89668966
"@typescript-eslint/utils" "^5.13.0"
89678967

8968-
eslint-plugin-unicorn@44.0.2:
8969-
version "44.0.2"
8970-
resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-44.0.2.tgz#6324a001c0a5e2ac00fb51b30db27d14c6c36ab3"
8971-
integrity sha512-GLIDX1wmeEqpGaKcnMcqRvMVsoabeF0Ton0EX4Th5u6Kmf7RM9WBl705AXFEsns56ESkEs0uyelLuUTvz9Tr0w==
8968+
eslint-plugin-unicorn@45.0.0:
8969+
version "45.0.0"
8970+
resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-45.0.0.tgz#a6650ff3000dc1a87cc2f6ac3a11edcde61712e2"
8971+
integrity sha512-iP8cMRxXKHonKioOhnCoCcqVhoqhAp6rB+nsoLjXFDxTHz3btWMAp8xwzjHA0B1K6YV/U/Yvqn1bUXZt8sJPuQ==
89728972
dependencies:
89738973
"@babel/helper-validator-identifier" "^7.19.1"
8974-
ci-info "^3.4.0"
8974+
ci-info "^3.6.1"
89758975
clean-regexp "^1.0.0"
89768976
eslint-utils "^3.0.0"
89778977
esquery "^1.4.0"
89788978
indent-string "^4.0.0"
89798979
is-builtin-module "^3.2.0"
8980+
jsesc "3.0.2"
89808981
lodash "^4.17.21"
89818982
pluralize "^8.0.0"
89828983
read-pkg-up "^7.0.1"
89838984
regexp-tree "^0.1.24"
8985+
regjsparser "0.9.1"
89848986
safe-regex "^2.1.1"
8985-
semver "^7.3.7"
8987+
semver "^7.3.8"
89868988
strip-indent "^3.0.0"
89878989

89888990
[email protected], eslint-scope@^5.1.1:
@@ -12402,6 +12404,11 @@ jsdom@^20.0.0:
1240212404
ws "^8.8.0"
1240312405
xml-name-validator "^4.0.0"
1240412406

12407+
12408+
version "3.0.2"
12409+
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e"
12410+
integrity sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==
12411+
1240512412
jsesc@^2.5.1:
1240612413
version "2.5.2"
1240712414
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
@@ -15580,6 +15587,13 @@ regjsgen@^0.6.0:
1558015587
resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.6.0.tgz#83414c5354afd7d6627b16af5f10f41c4e71808d"
1558115588
integrity sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==
1558215589

15590+
15591+
version "0.9.1"
15592+
resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709"
15593+
integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==
15594+
dependencies:
15595+
jsesc "~0.5.0"
15596+
1558315597
regjsparser@^0.8.2:
1558415598
version "0.8.4"
1558515599
resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.8.4.tgz#8a14285ffcc5de78c5b95d62bbf413b6bc132d5f"

0 commit comments

Comments
 (0)