From e8ec1503d9b62b6ca23bbc31ca7ae96319e1edbe Mon Sep 17 00:00:00 2001 From: Niaz Date: Thu, 18 Jul 2024 21:00:14 +0200 Subject: [PATCH] Add eslint compat package --- eslint.config.mjs | 3 ++- package.json | 1 + src/Store/Settings/site-settings.ts | 2 +- yarn.lock | 5 +++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index cc518fd..8475d96 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -2,6 +2,7 @@ import jest from 'eslint-plugin-jest' import path from 'node:path' import { fileURLToPath } from 'node:url' import js from '@eslint/js' +import { fixupConfigRules } from '@eslint/compat' import { FlatCompat } from '@eslint/eslintrc' const __filename = fileURLToPath(import.meta.url) @@ -13,7 +14,7 @@ const compat = new FlatCompat({ }) export default [ - ...compat.extends('@react-native'), + ...fixupConfigRules(compat.extends('@react-native')), { plugins: { jest, diff --git a/package.json b/package.json index 10a933f..46ea697 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "devDependencies": { "@babel/core": "^7.21.0", "@babel/runtime": "^7.21.0", + "@eslint/compat": "^1.1.1", "@eslint/eslintrc": "^3.1.0", "@eslint/js": "^9.7.0", "@react-native/eslint-config": "^0.74.85", diff --git a/src/Store/Settings/site-settings.ts b/src/Store/Settings/site-settings.ts index 3db7ddf..40cb9d3 100644 --- a/src/Store/Settings/site-settings.ts +++ b/src/Store/Settings/site-settings.ts @@ -11,7 +11,7 @@ const SiteSettingsSchema = z.object({ allow_registration: z.boolean(), allow_upload: z.boolean(), skip_patterns: z.string(), - heavyweight_process: z.number(), + heavyweight_process: z.number().nullable(), map_api_key: z.string(), }) diff --git a/yarn.lock b/yarn.lock index be1de69..db334bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1156,6 +1156,11 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== +"@eslint/compat@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@eslint/compat/-/compat-1.1.1.tgz#5736523f5105c94dfae5f35e31debc38443722cd" + integrity sha512-lpHyRyplhGPL5mGEh6M9O5nnKk0Gz4bFI+Zu6tKlPpDUN7XshWvH9C/px4UVm87IAANE0W81CEsNGbS1KlzXpA== + "@eslint/config-array@^0.17.0": version "0.17.0" resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.17.0.tgz#ff305e1ee618a00e6e5d0485454c8d92d94a860d"