From 4b0ca811140c311f5cff6e394f4081229394eb45 Mon Sep 17 00:00:00 2001 From: Justin Wyne <1986068+wyne@users.noreply.github.com> Date: Mon, 20 Nov 2023 23:15:27 -0800 Subject: [PATCH] eslint import order --- .eslintrc.js | 6 +- App.tsx | 5 +- package-lock.json | 731 +++++++++++++++++- package.json | 1 + plugins/firebase-mods.js | 5 +- redux/GamesSlice.test.ts | 5 +- redux/GamesSlice.ts | 2 +- redux/SettingsSlice.test.ts | 6 +- redux/hooks.ts | 1 + src/Navigation.tsx | 5 +- src/components/AppInfo/RotatingIcon.tsx | 1 - src/components/Buttons/AppInfoButton.test.tsx | 4 +- src/components/Buttons/AppInfoButton.tsx | 5 +- src/components/Buttons/BackButton.tsx | 5 +- src/components/Buttons/CheckButton.test.tsx | 4 +- src/components/Buttons/CheckButton.tsx | 5 +- src/components/Buttons/FullscreenButton.tsx | 5 +- src/components/Buttons/HomeButton.tsx | 5 +- src/components/Buttons/NewGameButton.tsx | 2 +- src/components/EditGame.tsx | 2 +- src/components/EditPlayer.tsx | 5 +- src/components/GameListItem.tsx | 8 +- src/components/GameListItemPlayerName.tsx | 1 + src/components/Headers/AppInfoHeader.tsx | 5 +- src/components/Headers/GameHeader.tsx | 5 +- src/components/Headers/HomeHeader.tsx | 3 +- src/components/Headers/SettingsHeader.tsx | 1 + src/components/Headers/ShareHeader.tsx | 5 +- src/components/PlayerTile.tsx | 6 +- .../PlayerTiles/AdditionTile/TouchSurface.tsx | 8 +- src/components/Rounds.tsx | 3 +- src/components/ScoreLog/PlayerNameColumn.tsx | 2 +- src/components/ScoreLog/RoundScoreCell.tsx | 2 +- src/components/ScoreLog/RoundScoreColumn.tsx | 3 +- src/components/ScoreLog/TotalScoreCell.tsx | 3 +- src/components/ScoreLog/TotalScoreColumn.tsx | 3 +- src/components/Sheets/AddendModal.tsx | 7 +- src/components/Sheets/GameSheet.tsx | 9 +- src/screens/AppInfoScreen.tsx | 2 +- src/screens/ListScreen.tsx | 4 +- src/screens/OnboardingScreen.tsx | 3 +- src/screens/SettingsScreen.tsx | 5 +- src/screens/ShareScreen.tsx | 2 +- 43 files changed, 808 insertions(+), 92 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index de4ce7f3..cd40dbde 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,7 +5,7 @@ module.exports = { jest: true, }, parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], + plugins: ['@typescript-eslint', 'import'], extends: [ 'plugin:@typescript-eslint/recommended', 'plugin:jest/recommended', @@ -16,6 +16,10 @@ module.exports = { 'jest/no-disabled-tests': 0, 'semi': ['error', 'always'], 'eol-last': ['error', 'always'], + 'import/order': ['error', { + 'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'], + 'newlines-between': 'always', + }], }, ignorePatterns: ['web-build', '__mocks__'], }; diff --git a/App.tsx b/App.tsx index f1815eaf..eb5774ae 100644 --- a/App.tsx +++ b/App.tsx @@ -1,12 +1,13 @@ import React from 'react'; import { Provider } from 'react-redux'; import { PersistGate } from 'redux-persist/integration/react'; -import { store, persistor } from './redux/store'; import { StatusBar } from 'expo-status-bar'; -import { Navigation } from './src/Navigation'; import { View } from 'react-native'; import { GestureHandlerRootView } from 'react-native-gesture-handler'; import analytics from '@react-native-firebase/analytics'; + +import { Navigation } from './src/Navigation'; +import { store, persistor } from './redux/store'; import { AddendModalContextProvider } from './src/components/Sheets/AddendModalContext'; import { GameSheetContextProvider } from './src/components/Sheets/GameSheetContext'; diff --git a/package-lock.json b/package-lock.json index 536ceb45..e7a28ec5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -83,6 +83,7 @@ "babel-jest": "^29.5.0", "eslint": "^8.47.0", "eslint-config-prettier": "^9.0.0", + "eslint-plugin-import": "^2.29.0", "eslint-plugin-jest": "^27.2.3", "eslint-plugin-prettier": "^5.0.0", "gh-pages": "^4.0.0", @@ -8281,6 +8282,12 @@ "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", "dev": true }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "node_modules/@types/long": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", @@ -8852,6 +8859,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array-includes": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", + "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -8875,6 +8901,82 @@ "node": ">=0.10.0" } }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", + "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -9635,11 +9737,13 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10678,6 +10782,19 @@ "node": ">=0.8" } }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -11076,6 +11193,59 @@ "node": ">= 0.8" } }, + "node_modules/es-abstract": { + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", + "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.5", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.2", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es-get-iterator": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", @@ -11102,6 +11272,46 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, + "node_modules/es-set-tostringtag": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -11216,6 +11426,113 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz", + "integrity": "sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.14.2" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-plugin-jest": { "version": "27.2.3", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.3.tgz", @@ -12809,8 +13126,30 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/functions-have-names": { "version": "1.2.3", @@ -12840,14 +13179,14 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -12882,6 +13221,22 @@ "node": ">=6" } }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/getenv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/getenv/-/getenv-1.0.0.tgz", @@ -12962,6 +13317,21 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", @@ -12983,7 +13353,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -13030,6 +13399,7 @@ }, "node_modules/has": { "version": "1.0.3", + "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.1" @@ -13060,7 +13430,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.1" }, @@ -13106,6 +13475,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hermes-estree": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.12.0.tgz", @@ -13575,11 +13955,11 @@ } }, "node_modules/is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -13741,6 +14121,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -13939,6 +14331,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-weakset": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", @@ -18925,8 +19329,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -18974,6 +19379,52 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.fromentries": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", + "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1" + } + }, + "node_modules/object.values": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -20768,14 +21219,14 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" + "set-function-name": "^2.0.0" }, "engines": { "node": ">= 0.4" @@ -21124,6 +21575,30 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -21136,6 +21611,20 @@ "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", "optional": true }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -21297,6 +21786,34 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -21690,6 +22207,51 @@ "node": ">=8" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", @@ -22343,6 +22905,39 @@ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", "license": "Apache-2.0" }, + "node_modules/tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -22408,6 +23003,71 @@ "node": ">= 0.6" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typescript": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", @@ -22458,6 +23118,21 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -22848,13 +23523,13 @@ "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" }, "node_modules/which-typed-array": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", - "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "call-bind": "^1.0.4", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-tostringtag": "^1.0.0" diff --git a/package.json b/package.json index 252fb6a7..7f764b93 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "babel-jest": "^29.5.0", "eslint": "^8.47.0", "eslint-config-prettier": "^9.0.0", + "eslint-plugin-import": "^2.29.0", "eslint-plugin-jest": "^27.2.3", "eslint-plugin-prettier": "^5.0.0", "gh-pages": "^4.0.0", diff --git a/plugins/firebase-mods.js b/plugins/firebase-mods.js index e522fc57..2e03cc64 100644 --- a/plugins/firebase-mods.js +++ b/plugins/firebase-mods.js @@ -1,9 +1,10 @@ +const fs = require('fs'); +const path = require('path'); + const { withDangerousMod, withPlugins } = require('@expo/config-plugins'); const { mergeContents } = require('@expo/config-plugins/build/utils/generateCode'); -const fs = require('fs'); -const path = require('path'); async function readFileAsync(path) { return fs.promises.readFile(path, 'utf8'); diff --git a/redux/GamesSlice.test.ts b/redux/GamesSlice.test.ts index 39d24bf1..a533a5e6 100644 --- a/redux/GamesSlice.test.ts +++ b/redux/GamesSlice.test.ts @@ -1,4 +1,7 @@ import { configureStore } from '@reduxjs/toolkit'; +import { EntityState } from '@reduxjs/toolkit'; +import { Store } from 'redux'; + import gamesReducer, { roundNext, roundPrevious, @@ -7,8 +10,6 @@ import gamesReducer, { selectAllGames, } from './GamesSlice'; import { GameState } from './GamesSlice'; -import { EntityState } from '@reduxjs/toolkit'; -import { Store } from 'redux'; describe('games reducer', () => { let store: Store>; diff --git a/redux/GamesSlice.ts b/redux/GamesSlice.ts index b6a3d6de..183897a8 100644 --- a/redux/GamesSlice.ts +++ b/redux/GamesSlice.ts @@ -2,8 +2,8 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit'; import { createEntityAdapter } from '@reduxjs/toolkit'; import { createAsyncThunk } from '@reduxjs/toolkit'; import * as Crypto from 'expo-crypto'; - import analytics from '@react-native-firebase/analytics'; + import { playerAdd } from './PlayersSlice'; import { setCurrentGameId } from './SettingsSlice'; diff --git a/redux/SettingsSlice.test.ts b/redux/SettingsSlice.test.ts index 213fe4d7..9b6a0848 100644 --- a/redux/SettingsSlice.test.ts +++ b/redux/SettingsSlice.test.ts @@ -1,12 +1,14 @@ +import { Store } from 'redux'; +import { configureStore } from '@reduxjs/toolkit'; + import settingsReducer, { setCurrentGameId, toggleHomeFullscreen, setMultiplier, setOnboardedVersion, } from './SettingsSlice'; -import { Store } from 'redux'; import { SettingsState } from './SettingsSlice'; -import { configureStore } from '@reduxjs/toolkit'; + describe('settings reducer', () => { let store: Store; diff --git a/redux/hooks.ts b/redux/hooks.ts index 02123001..4d36331e 100644 --- a/redux/hooks.ts +++ b/redux/hooks.ts @@ -1,4 +1,5 @@ import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'; + import type { RootState, AppDispatch } from './store'; // Use throughout your app instead of plain `useDispatch` and `useSelector` diff --git a/src/Navigation.tsx b/src/Navigation.tsx index 69dd2aad..028a3d71 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -2,19 +2,20 @@ import React from 'react'; import { DarkTheme, NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import * as Application from 'expo-application'; +import { SemVer, parse } from 'semver'; import ListScreen from "../src/screens/ListScreen"; import GameScreen from "../src/screens/GameScreen"; import SettingsScreen from "../src/screens/SettingsScreen"; import AppInfoScreen from "../src/screens/AppInfoScreen"; import OnboardingScreen from '../src/screens/OnboardingScreen'; -import ShareScreen from './screens/ShareScreen'; import HomeHeader from '../src/components/Headers/HomeHeader'; import GameHeader from '../src/components/Headers/GameHeader'; import SettingsHeader from '../src/components/Headers/SettingsHeader'; import AppInfoHeader from '../src/components/Headers/AppInfoHeader'; import { useAppSelector } from '../redux/hooks'; -import { SemVer, parse } from 'semver'; + +import ShareScreen from './screens/ShareScreen'; import ShareHeader from './components/Headers/ShareHeader'; export type OnboardingScreenParamList = { diff --git a/src/components/AppInfo/RotatingIcon.tsx b/src/components/AppInfo/RotatingIcon.tsx index e7ec3b34..83a411a1 100644 --- a/src/components/AppInfo/RotatingIcon.tsx +++ b/src/components/AppInfo/RotatingIcon.tsx @@ -2,7 +2,6 @@ import React from 'react'; import { TouchableWithoutFeedback } from 'react-native'; import { Image } from 'expo-image'; import analytics from '@react-native-firebase/analytics'; - import Animated, { Easing, PinwheelIn, diff --git a/src/components/Buttons/AppInfoButton.test.tsx b/src/components/Buttons/AppInfoButton.test.tsx index 278ce31d..c0959e06 100644 --- a/src/components/Buttons/AppInfoButton.test.tsx +++ b/src/components/Buttons/AppInfoButton.test.tsx @@ -1,8 +1,10 @@ import { render, fireEvent, waitFor } from '@testing-library/react-native'; import analytics from '@react-native-firebase/analytics'; -import AppInfoButton from './AppInfoButton'; + import { useNavigationMock } from '../../../test/test-helpers'; +import AppInfoButton from './AppInfoButton'; + describe('AppInfoButton', () => { const navigation = useNavigationMock(); diff --git a/src/components/Buttons/AppInfoButton.tsx b/src/components/Buttons/AppInfoButton.tsx index 3be3c503..14f63760 100644 --- a/src/components/Buttons/AppInfoButton.tsx +++ b/src/components/Buttons/AppInfoButton.tsx @@ -2,11 +2,12 @@ import React from 'react'; import analytics from '@react-native-firebase/analytics'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase } from '@react-navigation/native'; - -import HeaderButton from './HeaderButton'; import { Icon } from 'react-native-elements/dist/icons/Icon'; + import { systemBlue } from '../../constants'; +import HeaderButton from './HeaderButton'; + interface Props { navigation: NativeStackNavigationProp; } diff --git a/src/components/Buttons/BackButton.tsx b/src/components/Buttons/BackButton.tsx index d2fba982..29dfd61c 100644 --- a/src/components/Buttons/BackButton.tsx +++ b/src/components/Buttons/BackButton.tsx @@ -2,11 +2,12 @@ import React from 'react'; import analytics from '@react-native-firebase/analytics'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase } from '@react-navigation/native'; - -import HeaderButton from './HeaderButton'; import { Icon } from 'react-native-elements/dist/icons/Icon'; + import { systemBlue } from '../../constants'; +import HeaderButton from './HeaderButton'; + interface Props { navigation: NativeStackNavigationProp; } diff --git a/src/components/Buttons/CheckButton.test.tsx b/src/components/Buttons/CheckButton.test.tsx index 566ebee1..b70eb149 100644 --- a/src/components/Buttons/CheckButton.test.tsx +++ b/src/components/Buttons/CheckButton.test.tsx @@ -1,8 +1,10 @@ import { render, fireEvent, waitFor } from '@testing-library/react-native'; import analytics from '@react-native-firebase/analytics'; -import CheckButton from './CheckButton'; + import { useNavigationMock } from '../../../test/test-helpers'; +import CheckButton from './CheckButton'; + describe('CheckButton', () => { const navigation = useNavigationMock(); diff --git a/src/components/Buttons/CheckButton.tsx b/src/components/Buttons/CheckButton.tsx index d890c97d..a161e62c 100644 --- a/src/components/Buttons/CheckButton.tsx +++ b/src/components/Buttons/CheckButton.tsx @@ -2,10 +2,11 @@ import React from 'react'; import analytics from '@react-native-firebase/analytics'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase, RouteProp } from '@react-navigation/native'; +import { Text } from 'react-native'; -import HeaderButton from './HeaderButton'; import { systemBlue } from '../../constants'; -import { Text } from 'react-native'; + +import HeaderButton from './HeaderButton'; type RouteParams = { Settings: { diff --git a/src/components/Buttons/FullscreenButton.tsx b/src/components/Buttons/FullscreenButton.tsx index 90ce837a..f315c35f 100644 --- a/src/components/Buttons/FullscreenButton.tsx +++ b/src/components/Buttons/FullscreenButton.tsx @@ -1,12 +1,13 @@ import React from 'react'; import analytics from '@react-native-firebase/analytics'; +import { Icon } from 'react-native-elements/dist/icons/Icon'; import { useAppDispatch, useAppSelector } from '../../../redux/hooks'; -import HeaderButton from './HeaderButton'; -import { Icon } from 'react-native-elements/dist/icons/Icon'; import { systemBlue } from '../../constants'; import { toggleHomeFullscreen } from '../../../redux/SettingsSlice'; +import HeaderButton from './HeaderButton'; + const FullscreenButton: React.FunctionComponent = ({ }) => { const dispatch = useAppDispatch(); const fullscreen = useAppSelector(state => state.settings.home_fullscreen); diff --git a/src/components/Buttons/HomeButton.tsx b/src/components/Buttons/HomeButton.tsx index a3a17be3..13393070 100644 --- a/src/components/Buttons/HomeButton.tsx +++ b/src/components/Buttons/HomeButton.tsx @@ -2,11 +2,12 @@ import React from 'react'; import analytics from '@react-native-firebase/analytics'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase } from '@react-navigation/native'; - -import HeaderButton from './HeaderButton'; import { Icon } from 'react-native-elements/dist/icons/Icon'; + import { systemBlue } from '../../constants'; +import HeaderButton from './HeaderButton'; + interface Props { navigation: NativeStackNavigationProp; } diff --git a/src/components/Buttons/NewGameButton.tsx b/src/components/Buttons/NewGameButton.tsx index 298c8f16..5ddb7683 100644 --- a/src/components/Buttons/NewGameButton.tsx +++ b/src/components/Buttons/NewGameButton.tsx @@ -2,11 +2,11 @@ import React from 'react'; import { Icon } from 'react-native-elements'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase } from '@react-navigation/native'; +import { MenuAction, MenuView } from '@react-native-menu/menu'; import { useAppSelector, useAppDispatch } from '../../../redux/hooks'; import { systemBlue } from '../../constants'; import { asyncCreateGame, selectAllGames } from '../../../redux/GamesSlice'; -import { MenuAction, MenuView } from '@react-native-menu/menu'; interface Props { navigation: NativeStackNavigationProp; diff --git a/src/components/EditGame.tsx b/src/components/EditGame.tsx index 29fe924f..70213cc3 100644 --- a/src/components/EditGame.tsx +++ b/src/components/EditGame.tsx @@ -1,8 +1,8 @@ import React, { useState } from 'react'; import { Text, View, StyleSheet, NativeSyntheticEvent, TextInputEndEditingEventData } from 'react-native'; -import { useAppDispatch, useAppSelector } from '../../redux/hooks'; import { Input } from 'react-native-elements'; +import { useAppDispatch, useAppSelector } from '../../redux/hooks'; import { selectGameById, updateGame } from '../../redux/GamesSlice'; const UNTITLED = "Untitled"; diff --git a/src/components/EditPlayer.tsx b/src/components/EditPlayer.tsx index bd998c2d..82440b7e 100644 --- a/src/components/EditPlayer.tsx +++ b/src/components/EditPlayer.tsx @@ -1,14 +1,15 @@ import React from 'react'; import { Text, View, StyleSheet, TouchableOpacity, NativeSyntheticEvent, TextInputEndEditingEventData, Alert } from 'react-native'; import { Icon, Input } from 'react-native-elements'; +import analytics from '@react-native-firebase/analytics'; +import Animated from 'react-native-reanimated'; import { palette } from '../constants'; import { selectGameById, updateGame } from '../../redux/GamesSlice'; import { selectPlayerById } from '../../redux/PlayersSlice'; import { removePlayer, updatePlayer } from '../../redux/PlayersSlice'; -import analytics from '@react-native-firebase/analytics'; import { useAppDispatch, useAppSelector } from '../../redux/hooks'; -import Animated from 'react-native-reanimated'; + interface Props { playerId: string; diff --git a/src/components/GameListItem.tsx b/src/components/GameListItem.tsx index e55eb759..2cbe8f33 100644 --- a/src/components/GameListItem.tsx +++ b/src/components/GameListItem.tsx @@ -6,13 +6,15 @@ import { Icon } from 'react-native-elements'; import Animated, { FadeInUp, SlideOutLeft } from 'react-native-reanimated'; import analytics from '@react-native-firebase/analytics'; import { MenuView, MenuAction, NativeActionEvent } from '@react-native-menu/menu'; +import { NativeStackNavigationProp } from '@react-navigation/native-stack'; +import { ParamListBase } from '@react-navigation/native'; +import { AnyAction, ThunkDispatch } from '@reduxjs/toolkit'; import { selectGameById, gameDelete } from '../../redux/GamesSlice'; import { setCurrentGameId } from '../../redux/SettingsSlice'; -import { NativeStackNavigationProp } from '@react-navigation/native-stack'; -import { ParamListBase } from '@react-navigation/native'; import { useAppDispatch, useAppSelector } from '../../redux/hooks'; -import { AnyAction, ThunkDispatch } from '@reduxjs/toolkit'; + + import GameListItemPlayerName from './GameListItemPlayerName'; export type Props = { diff --git a/src/components/GameListItemPlayerName.tsx b/src/components/GameListItemPlayerName.tsx index 49d3dbb7..1a15a712 100644 --- a/src/components/GameListItemPlayerName.tsx +++ b/src/components/GameListItemPlayerName.tsx @@ -1,4 +1,5 @@ import { Text } from "react-native"; + import { useAppSelector } from "../../redux/hooks"; import { selectPlayerById } from "../../redux/PlayersSlice"; diff --git a/src/components/Headers/AppInfoHeader.tsx b/src/components/Headers/AppInfoHeader.tsx index 9a2160c0..71d4730a 100644 --- a/src/components/Headers/AppInfoHeader.tsx +++ b/src/components/Headers/AppInfoHeader.tsx @@ -1,10 +1,11 @@ import React from 'react'; import { Text, StyleSheet } from 'react-native'; +import { NativeStackNavigationProp } from '@react-navigation/native-stack'; +import { ParamListBase } from '@react-navigation/native'; import HomeButton from '../Buttons/HomeButton'; + import CustomHeader from './CustomHeader'; -import { NativeStackNavigationProp } from '@react-navigation/native-stack'; -import { ParamListBase } from '@react-navigation/native'; interface Props { navigation: NativeStackNavigationProp; diff --git a/src/components/Headers/GameHeader.tsx b/src/components/Headers/GameHeader.tsx index cd001eb9..47a6a6e7 100644 --- a/src/components/Headers/GameHeader.tsx +++ b/src/components/Headers/GameHeader.tsx @@ -1,18 +1,19 @@ import React from 'react'; import { Text, StyleSheet, TouchableOpacity } from 'react-native'; import { Icon } from 'react-native-elements/dist/icons/Icon'; -import { useAppDispatch, useAppSelector } from '../../../redux/hooks'; import analytics from '@react-native-firebase/analytics'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase } from '@react-navigation/native'; +import { Button } from 'react-native-elements'; +import { useAppDispatch, useAppSelector } from '../../../redux/hooks'; import FullscreenButton from '../Buttons/FullscreenButton'; import { roundNext, roundPrevious } from '../../../redux/GamesSlice'; import { selectGameById } from '../../../redux/GamesSlice'; import { systemBlue } from '../../constants'; -import { Button } from 'react-native-elements'; import HomeButton from '../Buttons/HomeButton'; import AddendButton from '../Buttons/AddendButton'; + import CustomHeader from './CustomHeader'; interface PrevRoundButtonProps { diff --git a/src/components/Headers/HomeHeader.tsx b/src/components/Headers/HomeHeader.tsx index 89d0d044..afc60081 100644 --- a/src/components/Headers/HomeHeader.tsx +++ b/src/components/Headers/HomeHeader.tsx @@ -1,10 +1,11 @@ import React from 'react'; import { Text, StyleSheet, View } from 'react-native'; -import AppInfoButton from '../Buttons/AppInfoButton'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase } from '@react-navigation/native'; +import AppInfoButton from '../Buttons/AppInfoButton'; import NewGameButton from '../Buttons/NewGameButton'; + import CustomHeader from './CustomHeader'; interface Props { diff --git a/src/components/Headers/SettingsHeader.tsx b/src/components/Headers/SettingsHeader.tsx index 5fe06642..658f2904 100644 --- a/src/components/Headers/SettingsHeader.tsx +++ b/src/components/Headers/SettingsHeader.tsx @@ -4,6 +4,7 @@ import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase, RouteProp } from '@react-navigation/native'; import CheckButton from '../Buttons/CheckButton'; + import CustomHeader from './CustomHeader'; type RouteParams = { diff --git a/src/components/Headers/ShareHeader.tsx b/src/components/Headers/ShareHeader.tsx index 647957fb..75f735aa 100644 --- a/src/components/Headers/ShareHeader.tsx +++ b/src/components/Headers/ShareHeader.tsx @@ -1,11 +1,12 @@ import React from 'react'; import { Text, StyleSheet } from 'react-native'; - -import CustomHeader from './CustomHeader'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase } from '@react-navigation/native'; + import BackButton from '../Buttons/BackButton'; +import CustomHeader from './CustomHeader'; + interface Props { navigation: NativeStackNavigationProp; } diff --git a/src/components/PlayerTile.tsx b/src/components/PlayerTile.tsx index e7c8d906..8be8b7ee 100644 --- a/src/components/PlayerTile.tsx +++ b/src/components/PlayerTile.tsx @@ -1,12 +1,14 @@ import React from 'react'; import { StyleSheet, DimensionValue } from 'react-native'; +import Animated, { Easing, FadeIn } from 'react-native-reanimated'; -import AdditionTile from './PlayerTiles/AdditionTile/AdditionTile'; import { selectGameById } from '../../redux/GamesSlice'; import { selectPlayerById } from '../../redux/PlayersSlice'; import { useAppSelector } from '../../redux/hooks'; + +import AdditionTile from './PlayerTiles/AdditionTile/AdditionTile'; import { TouchSurface } from './PlayerTiles/AdditionTile/TouchSurface'; -import Animated, { Easing, FadeIn } from 'react-native-reanimated'; + interface Props { index: number; diff --git a/src/components/PlayerTiles/AdditionTile/TouchSurface.tsx b/src/components/PlayerTiles/AdditionTile/TouchSurface.tsx index fba13402..67c0712b 100644 --- a/src/components/PlayerTiles/AdditionTile/TouchSurface.tsx +++ b/src/components/PlayerTiles/AdditionTile/TouchSurface.tsx @@ -1,12 +1,14 @@ import React from 'react'; import { StyleSheet, TouchableHighlight, View } from 'react-native'; -import { ScoreParticle } from './ScoreParticle'; import { useState } from 'react'; +import * as Haptics from 'expo-haptics'; +import analytics from '@react-native-firebase/analytics'; + import { playerRoundScoreIncrement } from '../../../../redux/PlayersSlice'; import { useAppDispatch, useAppSelector } from '../../../../redux/hooks'; import { selectGameById } from '../../../../redux/GamesSlice'; -import * as Haptics from 'expo-haptics'; -import analytics from '@react-native-firebase/analytics'; + +import { ScoreParticle } from './ScoreParticle'; type ScoreParticleProps = { key: string; diff --git a/src/components/Rounds.tsx b/src/components/Rounds.tsx index 536dce99..6b191bd3 100644 --- a/src/components/Rounds.tsx +++ b/src/components/Rounds.tsx @@ -4,10 +4,11 @@ import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase } from '@react-navigation/native'; import { selectGameById } from '../../redux/GamesSlice'; +import { useAppSelector } from '../../redux/hooks'; + import RoundScoreColumn from './ScoreLog/RoundScoreColumn'; import TotalScoreColumn from './ScoreLog/TotalScoreColumn'; import PlayerNameColumn from './ScoreLog/PlayerNameColumn'; -import { useAppSelector } from '../../redux/hooks'; interface Props { navigation: NativeStackNavigationProp; diff --git a/src/components/ScoreLog/PlayerNameColumn.tsx b/src/components/ScoreLog/PlayerNameColumn.tsx index ff4258ee..a4b14231 100644 --- a/src/components/ScoreLog/PlayerNameColumn.tsx +++ b/src/components/ScoreLog/PlayerNameColumn.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { Text, View, StyleSheet } from 'react-native'; +import { Icon } from 'react-native-elements/dist/icons/Icon'; import { useAppSelector } from '../../../redux/hooks'; import { palette, systemBlue } from '../../constants'; import { selectGameById } from '../../../redux/GamesSlice'; import { selectAllPlayers } from '../../../redux/PlayersSlice'; -import { Icon } from 'react-native-elements/dist/icons/Icon'; const PlayerNameColumn: React.FunctionComponent = ({ }) => { const currentGameId = useAppSelector(state => state.settings.currentGameId); diff --git a/src/components/ScoreLog/RoundScoreCell.tsx b/src/components/ScoreLog/RoundScoreCell.tsx index a5785d52..f3429317 100644 --- a/src/components/ScoreLog/RoundScoreCell.tsx +++ b/src/components/ScoreLog/RoundScoreCell.tsx @@ -1,7 +1,7 @@ import React, { memo } from 'react'; import { Text, StyleSheet } from 'react-native'; -import { useAppSelector } from '../../../redux/hooks'; +import { useAppSelector } from '../../../redux/hooks'; import { selectPlayerById } from '../../../redux/PlayersSlice'; interface Props { diff --git a/src/components/ScoreLog/RoundScoreColumn.tsx b/src/components/ScoreLog/RoundScoreColumn.tsx index b6aa8a28..fa7a9005 100644 --- a/src/components/ScoreLog/RoundScoreColumn.tsx +++ b/src/components/ScoreLog/RoundScoreColumn.tsx @@ -2,9 +2,10 @@ import React, { memo, useCallback } from 'react'; import { Text, View } from 'react-native'; import { TouchableWithoutFeedback } from 'react-native'; import analytics from '@react-native-firebase/analytics'; -import { useAppDispatch, useAppSelector } from '../../../redux/hooks'; +import { useAppDispatch, useAppSelector } from '../../../redux/hooks'; import { selectGameById, updateGame } from '../../../redux/GamesSlice'; + import RoundScoreCell from './RoundScoreCell'; interface Props { diff --git a/src/components/ScoreLog/TotalScoreCell.tsx b/src/components/ScoreLog/TotalScoreCell.tsx index e066f593..15e5c824 100644 --- a/src/components/ScoreLog/TotalScoreCell.tsx +++ b/src/components/ScoreLog/TotalScoreCell.tsx @@ -1,7 +1,8 @@ import React, { memo } from 'react'; import { Text } from 'react-native'; -import { selectPlayerById } from '../../../redux/PlayersSlice'; import { StyleSheet } from 'react-native'; + +import { selectPlayerById } from '../../../redux/PlayersSlice'; import { useAppSelector } from '../../../redux/hooks'; export type Props = { diff --git a/src/components/ScoreLog/TotalScoreColumn.tsx b/src/components/ScoreLog/TotalScoreColumn.tsx index 74169cb3..ac126586 100644 --- a/src/components/ScoreLog/TotalScoreColumn.tsx +++ b/src/components/ScoreLog/TotalScoreColumn.tsx @@ -2,9 +2,10 @@ import React from 'react'; import { Text, View, StyleSheet } from 'react-native'; import { selectGameById } from '../../../redux/GamesSlice'; -import TotalScoreCell from './TotalScoreCell'; import { useAppSelector } from '../../../redux/hooks'; +import TotalScoreCell from './TotalScoreCell'; + const TotalScoreColumn = ({ }) => { const currentGameId = useAppSelector(state => state.settings.currentGameId); const currentGame = useAppSelector(state => selectGameById(state, currentGameId)); diff --git a/src/components/Sheets/AddendModal.tsx b/src/components/Sheets/AddendModal.tsx index 4ef1966a..9bf9e9f4 100644 --- a/src/components/Sheets/AddendModal.tsx +++ b/src/components/Sheets/AddendModal.tsx @@ -1,12 +1,13 @@ import React, { useCallback, useMemo } from 'react'; import { View, StyleSheet, Text } from 'react-native'; -import { useAppDispatch, useAppSelector } from '../../../redux/hooks'; import { BottomSheetBackdrop, BottomSheetBackdropProps, BottomSheetModal } from '@gorhom/bottom-sheet'; - -import { useAddendModalContext } from './AddendModalContext'; import { Picker } from '@react-native-picker/picker'; + +import { useAppDispatch, useAppSelector } from '../../../redux/hooks'; import { setAddendOne, setAddendTwo, setMultiplier } from '../../../redux/SettingsSlice'; +import { useAddendModalContext } from './AddendModalContext'; + interface Props { } diff --git a/src/components/Sheets/GameSheet.tsx b/src/components/Sheets/GameSheet.tsx index bb653e86..38f30d11 100644 --- a/src/components/Sheets/GameSheet.tsx +++ b/src/components/Sheets/GameSheet.tsx @@ -5,18 +5,19 @@ import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase } from '@react-navigation/native'; import BottomSheet, { BottomSheetBackdrop, BottomSheetBackdropProps, BottomSheetScrollView } from '@gorhom/bottom-sheet'; import { useIsFocused } from '@react-navigation/native'; +import Animated, { Extrapolate, FadeIn, Layout, interpolate, useAnimatedStyle, useSharedValue } from 'react-native-reanimated'; +import { TouchableWithoutFeedback } from 'react-native'; +import { Button } from 'react-native-elements'; import { useAppDispatch, useAppSelector } from '../../../redux/hooks'; import Rounds from '../Rounds'; import { selectGameById, updateGame } from '../../../redux/GamesSlice'; import { systemBlue } from '../../constants'; -import Animated, { Extrapolate, FadeIn, Layout, interpolate, useAnimatedStyle, useSharedValue } from 'react-native-reanimated'; -import { TouchableWithoutFeedback } from 'react-native'; -import { Button } from 'react-native-elements'; -import { useGameSheetContext } from './GameSheetContext'; import BigButton from '../BigButtons/BigButton'; import { selectAllPlayers, updatePlayer } from '../../../redux/PlayersSlice'; +import { useGameSheetContext } from './GameSheetContext'; + /** * Height of the bottom sheet */ diff --git a/src/screens/AppInfoScreen.tsx b/src/screens/AppInfoScreen.tsx index 0b4abfa1..172222cf 100644 --- a/src/screens/AppInfoScreen.tsx +++ b/src/screens/AppInfoScreen.tsx @@ -5,9 +5,9 @@ import * as Application from 'expo-application'; import analytics from '@react-native-firebase/analytics'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase } from '@react-navigation/routers'; +import { Button } from 'react-native-elements'; import RotatingIcon from '../components/AppInfo/RotatingIcon'; -import { Button } from 'react-native-elements'; import { useAppDispatch, useAppSelector } from '../../redux/hooks'; import { toggleshowPointParticles } from '../../redux/SettingsSlice'; diff --git a/src/screens/ListScreen.tsx b/src/screens/ListScreen.tsx index b2ba4c98..33312806 100644 --- a/src/screens/ListScreen.tsx +++ b/src/screens/ListScreen.tsx @@ -3,12 +3,12 @@ import { StyleSheet, Text, View } from 'react-native'; import Animated, { Layout, Easing } from 'react-native-reanimated'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase } from '@react-navigation/native'; -import { useAppSelector, useAppDispatch } from '../../redux/hooks'; import { BlurView } from 'expo-blur'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { useAppSelector, useAppDispatch } from '../../redux/hooks'; import { asyncCreateGame, selectAllGames } from '../../redux/GamesSlice'; import GameListItem from '../components/GameListItem'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { setOnboardedVersion } from '../../redux/SettingsSlice'; interface Props { diff --git a/src/screens/OnboardingScreen.tsx b/src/screens/OnboardingScreen.tsx index f703aaa7..623c630b 100644 --- a/src/screens/OnboardingScreen.tsx +++ b/src/screens/OnboardingScreen.tsx @@ -12,8 +12,9 @@ import { ExpandingDot } from "react-native-animated-pagination-dots"; import { SafeAreaView } from 'react-native-safe-area-context'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { RouteProp } from '@react-navigation/native'; -import { RootStackParamList } from '../Navigation'; import { Button } from 'react-native-elements'; + +import { RootStackParamList } from '../Navigation'; import SkipButton from '../components/Onboarding/SkipButton'; const { width } = Dimensions.get('screen'); diff --git a/src/screens/SettingsScreen.tsx b/src/screens/SettingsScreen.tsx index c38091f9..3a76f718 100644 --- a/src/screens/SettingsScreen.tsx +++ b/src/screens/SettingsScreen.tsx @@ -1,20 +1,21 @@ import React, { useState } from 'react'; import { Text, View, StyleSheet } from 'react-native'; -import { useAppDispatch, useAppSelector } from '../../redux/hooks'; import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; import { Icon, Button } from 'react-native-elements'; import * as Crypto from 'expo-crypto'; import analytics from '@react-native-firebase/analytics'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { ParamListBase, RouteProp } from '@react-navigation/native'; +import Animated, { Layout } from 'react-native-reanimated'; +import { useAppDispatch, useAppSelector } from '../../redux/hooks'; import { playerAdd } from '../../redux/PlayersSlice'; import EditPlayer from '../components/EditPlayer'; import { selectGameById, updateGame, } from '../../redux/GamesSlice'; import { selectAllPlayers } from '../../redux/PlayersSlice'; import EditGame from '../components/EditGame'; import { systemBlue } from '../constants'; -import Animated, { Layout } from 'react-native-reanimated'; + type RouteParams = { Settings: { diff --git a/src/screens/ShareScreen.tsx b/src/screens/ShareScreen.tsx index 11033d78..81462b26 100644 --- a/src/screens/ShareScreen.tsx +++ b/src/screens/ShareScreen.tsx @@ -6,13 +6,13 @@ import { ParamListBase } from '@react-navigation/native'; import { captureRef } from "react-native-view-shot"; import analytics from '@react-native-firebase/analytics'; import * as Sharing from 'expo-sharing'; +import { Button, Icon } from 'react-native-elements'; import { selectGameById } from '../../redux/GamesSlice'; import RoundScoreColumn from '../components/ScoreLog/RoundScoreColumn'; import TotalScoreColumn from '../components/ScoreLog/TotalScoreColumn'; import PlayerNameColumn from '../components/ScoreLog/PlayerNameColumn'; import { useAppSelector } from '../../redux/hooks'; -import { Button, Icon } from 'react-native-elements'; import { systemBlue } from '../constants'; interface Props {