chore(deps): update dependency eslint-plugin-unicorn to v52 (#8629)

* chore(deps): update dependency eslint-plugin-unicorn to v52

* chore: linting

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
renovate[bot] 2024-04-08 12:45:46 -04:00 committed by GitHub
parent da750ed838
commit fff12e3d78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 44 additions and 43 deletions

View File

@ -21,6 +21,7 @@ module.exports = {
'unicorn/prefer-module': 'off', 'unicorn/prefer-module': 'off',
'unicorn/prevent-abbreviations': 'off', 'unicorn/prevent-abbreviations': 'off',
'unicorn/no-process-exit': 'off', 'unicorn/no-process-exit': 'off',
'unicorn/import-style': 'off',
curly: 2, curly: 2,
'prettier/prettier': 0, 'prettier/prettier': 0,
}, },

8
cli/package-lock.json generated
View File

@ -30,7 +30,7 @@
"eslint": "^8.56.0", "eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^51.0.0", "eslint-plugin-unicorn": "^52.0.0",
"glob": "^10.3.1", "glob": "^10.3.1",
"mock-fs": "^5.2.0", "mock-fs": "^5.2.0",
"prettier": "^3.2.5", "prettier": "^3.2.5",
@ -2194,9 +2194,9 @@
} }
}, },
"node_modules/eslint-plugin-unicorn": { "node_modules/eslint-plugin-unicorn": {
"version": "51.0.1", "version": "52.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-52.0.0.tgz",
"integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", "integrity": "sha512-1Yzm7/m+0R4djH0tjDjfVei/ju2w3AzUGjG6q8JnuNIL5xIwsflyCooW5sfBvQp2pMYQFSWWCFONsjCax1EHng==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/helper-validator-identifier": "^7.22.20", "@babel/helper-validator-identifier": "^7.22.20",

View File

@ -28,7 +28,7 @@
"eslint": "^8.56.0", "eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^51.0.0", "eslint-plugin-unicorn": "^52.0.0",
"glob": "^10.3.1", "glob": "^10.3.1",
"mock-fs": "^5.2.0", "mock-fs": "^5.2.0",
"prettier": "^3.2.5", "prettier": "^3.2.5",

View File

@ -19,6 +19,7 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-floating-promises': 'error',
'unicorn/prefer-module': 'off', 'unicorn/prefer-module': 'off',
'unicorn/import-style': 'off',
curly: 2, curly: 2,
'prettier/prettier': 0, 'prettier/prettier': 0,
'unicorn/prevent-abbreviations': 'off', 'unicorn/prevent-abbreviations': 'off',

10
e2e/package-lock.json generated
View File

@ -23,7 +23,7 @@
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^51.0.1", "eslint-plugin-unicorn": "^52.0.0",
"exiftool-vendored": "^24.5.0", "exiftool-vendored": "^24.5.0",
"luxon": "^3.4.4", "luxon": "^3.4.4",
"pg": "^8.11.3", "pg": "^8.11.3",
@ -63,7 +63,7 @@
"eslint": "^8.56.0", "eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^51.0.0", "eslint-plugin-unicorn": "^52.0.0",
"glob": "^10.3.1", "glob": "^10.3.1",
"mock-fs": "^5.2.0", "mock-fs": "^5.2.0",
"prettier": "^3.2.5", "prettier": "^3.2.5",
@ -2343,9 +2343,9 @@
} }
}, },
"node_modules/eslint-plugin-unicorn": { "node_modules/eslint-plugin-unicorn": {
"version": "51.0.1", "version": "52.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-52.0.0.tgz",
"integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", "integrity": "sha512-1Yzm7/m+0R4djH0tjDjfVei/ju2w3AzUGjG6q8JnuNIL5xIwsflyCooW5sfBvQp2pMYQFSWWCFONsjCax1EHng==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/helper-validator-identifier": "^7.22.20", "@babel/helper-validator-identifier": "^7.22.20",

View File

@ -33,7 +33,7 @@
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^51.0.1", "eslint-plugin-unicorn": "^52.0.0",
"exiftool-vendored": "^24.5.0", "exiftool-vendored": "^24.5.0",
"luxon": "^3.4.4", "luxon": "^3.4.4",
"pg": "^8.11.3", "pg": "^8.11.3",

View File

@ -148,7 +148,7 @@ describe('/activity', () => {
}); });
it('should filter by userId', async () => { it('should filter by userId', async () => {
const [reaction] = await Promise.all([createActivity({ albumId: album.id, type: ReactionType.Like })]); const reaction = await createActivity({ albumId: album.id, type: ReactionType.Like });
const response1 = await request(app) const response1 = await request(app)
.get('/activity') .get('/activity')
@ -250,8 +250,7 @@ describe('/activity', () => {
}); });
it('should return a 200 for a duplicate like on the album', async () => { it('should return a 200 for a duplicate like on the album', async () => {
const [reaction] = await Promise.all([createActivity({ albumId: album.id, type: ReactionType.Like })]); const reaction = await createActivity({ albumId: album.id, type: ReactionType.Like });
const { status, body } = await request(app) const { status, body } = await request(app)
.post('/activity') .post('/activity')
.set('Authorization', `Bearer ${admin.accessToken}`) .set('Authorization', `Bearer ${admin.accessToken}`)
@ -261,13 +260,11 @@ describe('/activity', () => {
}); });
it('should not confuse an album like with an asset like', async () => { it('should not confuse an album like with an asset like', async () => {
const [reaction] = await Promise.all([ const reaction = await createActivity({
createActivity({ albumId: album.id,
albumId: album.id, assetId: asset.id,
assetId: asset.id, type: ReactionType.Like,
type: ReactionType.Like, });
}),
]);
const { status, body } = await request(app) const { status, body } = await request(app)
.post('/activity') .post('/activity')
.set('Authorization', `Bearer ${admin.accessToken}`) .set('Authorization', `Bearer ${admin.accessToken}`)
@ -314,13 +311,11 @@ describe('/activity', () => {
}); });
it('should return a 200 for a duplicate like on an asset', async () => { it('should return a 200 for a duplicate like on an asset', async () => {
const [reaction] = await Promise.all([ const reaction = await createActivity({
createActivity({ albumId: album.id,
albumId: album.id, assetId: asset.id,
assetId: asset.id, type: ReactionType.Like,
type: ReactionType.Like, });
}),
]);
const { status, body } = await request(app) const { status, body } = await request(app)
.post('/activity') .post('/activity')

View File

@ -111,7 +111,7 @@ describe('/asset', () => {
utils.createAsset(user1.accessToken), utils.createAsset(user1.accessToken),
]); ]);
user2Assets = await Promise.all([utils.createAsset(user2.accessToken)]); user2Assets = [await utils.createAsset(user2.accessToken)];
await Promise.all([ await Promise.all([
utils.createAsset(timeBucketUser.accessToken, { fileCreatedAt: new Date('1970-01-01').toISOString() }), utils.createAsset(timeBucketUser.accessToken, { fileCreatedAt: new Date('1970-01-01').toISOString() }),

View File

@ -1,7 +1,7 @@
import { exec, spawn } from 'node:child_process'; import { exec, spawn } from 'node:child_process';
import { setTimeout } from 'node:timers'; import { setTimeout } from 'node:timers';
export default async () => { const setup = async () => {
let _resolve: () => unknown; let _resolve: () => unknown;
let _reject: (error: Error) => unknown; let _reject: (error: Error) => unknown;
@ -31,3 +31,5 @@ export default async () => {
await new Promise<void>((resolve) => exec('docker compose down', () => resolve())); await new Promise<void>((resolve) => exec('docker compose down', () => resolve()));
}; };
}; };
export default setup;

View File

@ -25,6 +25,7 @@ module.exports = {
'unicorn/prefer-top-level-await': 'off', 'unicorn/prefer-top-level-await': 'off',
'unicorn/prefer-event-target': 'off', 'unicorn/prefer-event-target': 'off',
'unicorn/no-thenable': 'off', 'unicorn/no-thenable': 'off',
'unicorn/import-style': 'off',
'@typescript-eslint/await-thenable': 'error', '@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error', '@typescript-eslint/no-misused-promises': 'error',

View File

@ -88,7 +88,7 @@
"eslint": "^8.56.0", "eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^51.0.0", "eslint-plugin-unicorn": "^52.0.0",
"jest": "^29.6.4", "jest": "^29.6.4",
"jest-when": "^3.6.0", "jest-when": "^3.6.0",
"mock-fs": "^5.2.0", "mock-fs": "^5.2.0",
@ -7493,9 +7493,9 @@
} }
}, },
"node_modules/eslint-plugin-unicorn": { "node_modules/eslint-plugin-unicorn": {
"version": "51.0.1", "version": "52.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-52.0.0.tgz",
"integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", "integrity": "sha512-1Yzm7/m+0R4djH0tjDjfVei/ju2w3AzUGjG6q8JnuNIL5xIwsflyCooW5sfBvQp2pMYQFSWWCFONsjCax1EHng==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/helper-validator-identifier": "^7.22.20", "@babel/helper-validator-identifier": "^7.22.20",
@ -19876,9 +19876,9 @@
} }
}, },
"eslint-plugin-unicorn": { "eslint-plugin-unicorn": {
"version": "51.0.1", "version": "52.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-52.0.0.tgz",
"integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", "integrity": "sha512-1Yzm7/m+0R4djH0tjDjfVei/ju2w3AzUGjG6q8JnuNIL5xIwsflyCooW5sfBvQp2pMYQFSWWCFONsjCax1EHng==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-validator-identifier": "^7.22.20", "@babel/helper-validator-identifier": "^7.22.20",

View File

@ -112,7 +112,7 @@
"eslint": "^8.56.0", "eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^51.0.0", "eslint-plugin-unicorn": "^52.0.0",
"jest": "^29.6.4", "jest": "^29.6.4",
"jest-when": "^3.6.0", "jest-when": "^3.6.0",
"mock-fs": "^5.2.0", "mock-fs": "^5.2.0",

View File

@ -50,6 +50,7 @@ module.exports = {
'unicorn/no-nested-ternary': 'off', 'unicorn/no-nested-ternary': 'off',
'unicorn/consistent-function-scoping': 'off', 'unicorn/consistent-function-scoping': 'off',
'unicorn/prefer-top-level-await': 'off', 'unicorn/prefer-top-level-await': 'off',
'unicorn/import-style': 'off',
// TODO: set recommended-type-checked and remove these rules // TODO: set recommended-type-checked and remove these rules
'@typescript-eslint/await-thenable': 'error', '@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-floating-promises': 'error',

8
web/package-lock.json generated
View File

@ -45,7 +45,7 @@
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1", "eslint-plugin-svelte": "^2.35.1",
"eslint-plugin-unicorn": "^51.0.1", "eslint-plugin-unicorn": "^52.0.0",
"factory.ts": "^1.4.1", "factory.ts": "^1.4.1",
"postcss": "^8.4.35", "postcss": "^8.4.35",
"prettier": "^3.2.5", "prettier": "^3.2.5",
@ -4167,9 +4167,9 @@
"dev": true "dev": true
}, },
"node_modules/eslint-plugin-unicorn": { "node_modules/eslint-plugin-unicorn": {
"version": "51.0.1", "version": "52.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-52.0.0.tgz",
"integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", "integrity": "sha512-1Yzm7/m+0R4djH0tjDjfVei/ju2w3AzUGjG6q8JnuNIL5xIwsflyCooW5sfBvQp2pMYQFSWWCFONsjCax1EHng==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/helper-validator-identifier": "^7.22.20", "@babel/helper-validator-identifier": "^7.22.20",

View File

@ -41,7 +41,7 @@
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1", "eslint-plugin-svelte": "^2.35.1",
"eslint-plugin-unicorn": "^51.0.1", "eslint-plugin-unicorn": "^52.0.0",
"factory.ts": "^1.4.1", "factory.ts": "^1.4.1",
"postcss": "^8.4.35", "postcss": "^8.4.35",
"prettier": "^3.2.5", "prettier": "^3.2.5",