You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-10 23:22:22 +02:00
chore: finish migrating eslint config files; bump unicorn (#17200)
This commit is contained in:
@@ -1,39 +1,29 @@
|
||||
import { FlatCompat } from '@eslint/eslintrc';
|
||||
import js from '@eslint/js';
|
||||
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
||||
import tsParser from '@typescript-eslint/parser';
|
||||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
||||
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
|
||||
import globals from 'globals';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import typescriptEslint from 'typescript-eslint';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
recommendedConfig: js.configs.recommended,
|
||||
allConfig: js.configs.all,
|
||||
});
|
||||
|
||||
export default [
|
||||
export default typescriptEslint.config([
|
||||
eslintPluginUnicorn.configs.recommended,
|
||||
eslintPluginPrettierRecommended,
|
||||
js.configs.recommended,
|
||||
typescriptEslint.configs.recommended,
|
||||
{
|
||||
ignores: ['eslint.config.mjs'],
|
||||
},
|
||||
...compat.extends(
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
'plugin:unicorn/recommended',
|
||||
),
|
||||
{
|
||||
plugins: {
|
||||
'@typescript-eslint': typescriptEslint,
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
},
|
||||
|
||||
parser: tsParser,
|
||||
parser: typescriptEslint.parser,
|
||||
ecmaVersion: 5,
|
||||
sourceType: 'module',
|
||||
|
||||
@@ -62,4 +52,4 @@ export default [
|
||||
'object-shorthand': ['error', 'always'],
|
||||
},
|
||||
},
|
||||
];
|
||||
]);
|
||||
|
783
e2e/package-lock.json
generated
783
e2e/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -30,13 +30,11 @@
|
||||
"@types/pg": "^8.11.0",
|
||||
"@types/pngjs": "^6.0.4",
|
||||
"@types/supertest": "^6.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
||||
"@typescript-eslint/parser": "^8.15.0",
|
||||
"@vitest/coverage-v8": "^3.0.0",
|
||||
"eslint": "^9.14.0",
|
||||
"eslint-config-prettier": "^10.0.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-unicorn": "^56.0.1",
|
||||
"eslint-plugin-unicorn": "^57.0.0",
|
||||
"exiftool-vendored": "^28.3.1",
|
||||
"globals": "^16.0.0",
|
||||
"jose": "^5.6.3",
|
||||
@@ -49,6 +47,7 @@
|
||||
"socket.io-client": "^4.7.4",
|
||||
"supertest": "^7.0.0",
|
||||
"typescript": "^5.3.3",
|
||||
"typescript-eslint": "^8.28.0",
|
||||
"utimes": "^5.2.1",
|
||||
"vitest": "^3.0.0"
|
||||
},
|
||||
|
@@ -22,7 +22,7 @@ const tests: Test[] = [
|
||||
},
|
||||
{
|
||||
test: 'should support paths with an asterisk',
|
||||
paths: [`/photos\*/image1.jpg`],
|
||||
paths: [`/photos*/image1.jpg`],
|
||||
files: {
|
||||
'/photos*/image1.jpg': true,
|
||||
'/photos*/image2.jpg': false,
|
||||
@@ -40,7 +40,7 @@ const tests: Test[] = [
|
||||
},
|
||||
{
|
||||
test: 'should support paths with a single quote',
|
||||
paths: [`/photos\'/image1.jpg`],
|
||||
paths: [`/photos'/image1.jpg`],
|
||||
files: {
|
||||
"/photos'/image1.jpg": true,
|
||||
"/photos'/image2.jpg": false,
|
||||
@@ -49,7 +49,7 @@ const tests: Test[] = [
|
||||
},
|
||||
{
|
||||
test: 'should support paths with a double quote',
|
||||
paths: [`/photos\"/image1.jpg`],
|
||||
paths: [`/photos"/image1.jpg`],
|
||||
files: {
|
||||
'/photos"/image1.jpg': true,
|
||||
'/photos"/image2.jpg': false,
|
||||
@@ -67,7 +67,7 @@ const tests: Test[] = [
|
||||
},
|
||||
{
|
||||
test: 'should support paths with an opening brace',
|
||||
paths: [`/photos\{/image1.jpg`],
|
||||
paths: [`/photos{/image1.jpg`],
|
||||
files: {
|
||||
'/photos{/image1.jpg': true,
|
||||
'/photos{/image2.jpg': false,
|
||||
@@ -76,7 +76,7 @@ const tests: Test[] = [
|
||||
},
|
||||
{
|
||||
test: 'should support paths with a closing brace',
|
||||
paths: [`/photos\}/image1.jpg`],
|
||||
paths: [`/photos}/image1.jpg`],
|
||||
files: {
|
||||
'/photos}/image1.jpg': true,
|
||||
'/photos}/image2.jpg': false,
|
||||
|
@@ -537,6 +537,7 @@ export const utils = {
|
||||
},
|
||||
|
||||
waitForQueueFinish: (accessToken: string, queue: keyof AllJobStatusResponseDto, ms?: number) => {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise<void>(async (resolve, reject) => {
|
||||
const timeout = setTimeout(() => reject(new Error('Timed out waiting for queue to empty')), ms || 10_000);
|
||||
|
||||
|
Reference in New Issue
Block a user